diff --git a/doc/build-helpers/dev-shell-tools.chapter.md b/doc/build-helpers/dev-shell-tools.chapter.md index 0168ea39f7aa..12018cd76cee 100644 --- a/doc/build-helpers/dev-shell-tools.chapter.md +++ b/doc/build-helpers/dev-shell-tools.chapter.md @@ -20,12 +20,12 @@ Converts Nix values to strings in the way the [`derivation` built-in function](h ```nix devShellTools.valueToString (builtins.toFile "foo" "bar") -=> "/nix/store/...-foo" +# => "/nix/store/...-foo" ``` ```nix devShellTools.valueToString false -=> "" +# => "" ``` ::: @@ -42,16 +42,22 @@ This function does not support `__structuredAttrs`, but does support `passAsFile devShellTools.unstructuredDerivationInputEnv { drvAttrs = { name = "foo"; - buildInputs = [ hello figlet ]; + buildInputs = [ + hello + figlet + ]; builder = bash; - args = [ "-c" "${./builder.sh}" ]; + args = [ + "-c" + "${./builder.sh}" + ]; }; } -=> { - name = "foo"; - buildInputs = "/nix/store/...-hello /nix/store/...-figlet"; - builder = "/nix/store/...-bash"; -} +# => { +# name = "foo"; +# buildInputs = "/nix/store/...-hello /nix/store/...-figlet"; +# builder = "/nix/store/...-bash"; +#} ``` Note that `args` is not included, because Nix does not added it to the builder process environment. @@ -69,7 +75,10 @@ Takes the relevant parts of a derivation and returns a set of environment variab let pkg = hello; in -devShellTools.derivationOutputEnv { outputList = pkg.outputs; outputMap = pkg; } +devShellTools.derivationOutputEnv { + outputList = pkg.outputs; + outputMap = pkg; +} ``` ::: diff --git a/doc/build-helpers/fetchers.chapter.md b/doc/build-helpers/fetchers.chapter.md index fd7b41f64c70..cfd0730d031c 100644 --- a/doc/build-helpers/fetchers.chapter.md +++ b/doc/build-helpers/fetchers.chapter.md @@ -491,7 +491,11 @@ It might be useful to manipulate the content downloaded by `fetchurl` directly i In this example, we'll adapt [](#ex-fetchers-fetchurl-nixpkgs-version) to append the result of running the `hello` package to the contents we download, purely to illustrate how to manipulate the content. ```nix -{ fetchurl, hello, lib }: +{ + fetchurl, + hello, + lib, +}: fetchurl { url = "https://raw.githubusercontent.com/NixOS/nixpkgs/23.11/.version"; @@ -714,9 +718,10 @@ A wrapper around `fetchpatch`, which takes: Here is an example of `fetchDebianPatch` in action: ```nix -{ lib -, fetchDebianPatch -, buildPythonPackage +{ + lib, + fetchDebianPatch, + buildPythonPackage, }: buildPythonPackage rec { @@ -914,7 +919,9 @@ It produces packages that cannot be built automatically. { fetchtorrent }: fetchtorrent { - config = { peer-limit-global = 100; }; + config = { + peer-limit-global = 100; + }; url = "magnet:?xt=urn:btih:dd8255ecdc7ca55fb0bbf81323d87062db1f6d1c"; hash = ""; } diff --git a/doc/build-helpers/images/appimagetools.section.md b/doc/build-helpers/images/appimagetools.section.md index cbd40ab6c35f..81d399e87812 100644 --- a/doc/build-helpers/images/appimagetools.section.md +++ b/doc/build-helpers/images/appimagetools.section.md @@ -66,7 +66,8 @@ let url = "https://github.com/irccloud/irccloud-desktop/releases/download/v${version}/IRCCloud-${version}-linux-x86_64.AppImage"; hash = "sha256-/hMPvYdnVB1XjKgU2v47HnVvW4+uC3rhRjbucqin4iI="; }; -in appimageTools.wrapType2 { +in +appimageTools.wrapType2 { inherit pname version src; extraPkgs = pkgs: [ pkgs.at-spi2-core ]; } @@ -106,7 +107,8 @@ let appimageContents = appimageTools.extract { inherit pname version src; }; -in appimageTools.wrapType2 { +in +appimageTools.wrapType2 { inherit pname version src; extraPkgs = pkgs: [ pkgs.at-spi2-core ]; @@ -150,7 +152,8 @@ let substituteInPlace $out/irccloud.desktop --replace-fail 'Exec=AppRun' 'Exec=${pname}' ''; }; -in appimageTools.wrapType2 { +in +appimageTools.wrapType2 { inherit pname version src; extraPkgs = pkgs: [ pkgs.at-spi2-core ]; diff --git a/doc/build-helpers/images/binarycache.section.md b/doc/build-helpers/images/binarycache.section.md index 954f07e93213..46b43bd4f65a 100644 --- a/doc/build-helpers/images/binarycache.section.md +++ b/doc/build-helpers/images/binarycache.section.md @@ -35,7 +35,7 @@ The following derivation will construct a flat-file binary cache containing the ```nix { mkBinaryCache, hello }: mkBinaryCache { - rootPaths = [hello]; + rootPaths = [ hello ]; } ``` diff --git a/doc/build-helpers/images/dockertools.section.md b/doc/build-helpers/images/dockertools.section.md index 04d477bdc506..fbb0df85d647 100644 --- a/doc/build-helpers/images/dockertools.section.md +++ b/doc/build-helpers/images/dockertools.section.md @@ -235,7 +235,11 @@ The following package builds a Docker image that runs the `redis-server` executa The Docker image will have name `redis` and tag `latest`. ```nix -{ dockerTools, buildEnv, redis }: +{ + dockerTools, + buildEnv, + redis, +}: dockerTools.buildImage { name = "redis"; tag = "latest"; @@ -253,7 +257,9 @@ dockerTools.buildImage { config = { Cmd = [ "/bin/redis-server" ]; WorkingDir = "/data"; - Volumes = { "/data" = { }; }; + Volumes = { + "/data" = { }; + }; }; } ``` @@ -286,7 +292,11 @@ 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 -{ dockerTools, buildEnv, hello }: +{ + dockerTools, + buildEnv, + hello, +}: dockerTools.buildImage { name = "hello"; tag = "latest"; @@ -320,7 +330,11 @@ This works the same as [](#ex-dockerTools-buildImage-runAsRoot), but uses `extra 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, + buildEnv, + hello, +}: dockerTools.buildImage { name = "hello"; tag = "latest"; @@ -350,7 +364,11 @@ dockerTools.buildImage { Note that using a value of `"now"` in the `created` attribute will break reproducibility. ```nix -{ dockerTools, buildEnv, hello }: +{ + dockerTools, + buildEnv, + hello, +}: dockerTools.buildImage { name = "hello"; tag = "latest"; @@ -766,7 +784,11 @@ 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, + hello, + lib, +}: dockerTools.streamLayeredImage { name = "hello"; tag = "latest"; @@ -1547,11 +1569,15 @@ The Docker image generated will have a name like `hello--env` and tag ` This example uses [](#ex-dockerTools-streamNixShellImage-hello) as a starting point. ```nix -{ dockerTools, cowsay, hello }: +{ + dockerTools, + cowsay, + hello, +}: dockerTools.streamNixShellImage { tag = "latest"; drv = hello.overrideAttrs (old: { - nativeBuildInputs = old.nativeBuildInputs or [] ++ [ + nativeBuildInputs = old.nativeBuildInputs or [ ] ++ [ cowsay ]; }); diff --git a/doc/build-helpers/images/makediskimage.section.md b/doc/build-helpers/images/makediskimage.section.md index 3edfa906aa6a..6d9afccdbae5 100644 --- a/doc/build-helpers/images/makediskimage.section.md +++ b/doc/build-helpers/images/makediskimage.section.md @@ -52,23 +52,23 @@ A `deterministic` flag is available for best efforts determinism. To produce a Nix-store only image: ```nix let - pkgs = import {}; + pkgs = import { }; lib = pkgs.lib; make-disk-image = import ; in - make-disk-image { - inherit pkgs lib; - config = {}; - additionalPaths = [ ]; - format = "qcow2"; - onlyNixStore = true; - partitionTableType = "none"; - installBootLoader = false; - touchEFIVars = false; - diskSize = "auto"; - additionalSpace = "0M"; # Defaults to 512M. - copyChannel = false; - } +make-disk-image { + inherit pkgs lib; + config = { }; + additionalPaths = [ ]; + format = "qcow2"; + onlyNixStore = true; + partitionTableType = "none"; + installBootLoader = false; + touchEFIVars = false; + diskSize = "auto"; + additionalSpace = "0M"; # Defaults to 512M. + copyChannel = false; +} ``` Some arguments can be left out, they are shown explicitly for the sake of the example. @@ -78,29 +78,36 @@ Building this derivation will provide a QCOW2 disk image containing only the Nix To produce a NixOS installation image disk with UEFI and bootloader installed: ```nix let - pkgs = import {}; + pkgs = import { }; lib = pkgs.lib; make-disk-image = import ; evalConfig = import ; in - make-disk-image { - inherit pkgs lib; - inherit (evalConfig { +make-disk-image { + inherit pkgs lib; + inherit + (evalConfig { modules = [ { - fileSystems."/" = { device = "/dev/vda"; fsType = "ext4"; autoFormat = true; }; + fileSystems."/" = { + device = "/dev/vda"; + fsType = "ext4"; + autoFormat = true; + }; boot.grub.device = "/dev/vda"; } ]; - }) config; - format = "qcow2"; - onlyNixStore = false; - partitionTableType = "legacy+gpt"; - installBootLoader = true; - touchEFIVars = true; - diskSize = "auto"; - additionalSpace = "0M"; # Defaults to 512M. - copyChannel = false; - memSize = 2048; # Qemu VM memory size in megabytes. Defaults to 1024M. - } + }) + config + ; + format = "qcow2"; + onlyNixStore = false; + partitionTableType = "legacy+gpt"; + installBootLoader = true; + touchEFIVars = true; + diskSize = "auto"; + additionalSpace = "0M"; # Defaults to 512M. + copyChannel = false; + memSize = 2048; # Qemu VM memory size in megabytes. Defaults to 1024M. +} ``` diff --git a/doc/build-helpers/images/ocitools.section.md b/doc/build-helpers/images/ocitools.section.md index 96627615ffb5..5101dd81715b 100644 --- a/doc/build-helpers/images/ocitools.section.md +++ b/doc/build-helpers/images/ocitools.section.md @@ -76,7 +76,11 @@ Note that no user namespace is created, which means that you won't be able to ru This example uses `ociTools.buildContainer` to create a simple container that runs `bash`. ```nix -{ ociTools, lib, bash }: +{ + ociTools, + lib, + bash, +}: ociTools.buildContainer { args = [ (lib.getExe bash) diff --git a/doc/build-helpers/images/portableservice.section.md b/doc/build-helpers/images/portableservice.section.md index c271bc775dba..43e44fe33aec 100644 --- a/doc/build-helpers/images/portableservice.section.md +++ b/doc/build-helpers/images/portableservice.section.md @@ -91,7 +91,12 @@ See [](#ex-portableService-hello) to understand how to use the output of `portab The following example builds a Portable Service image with the `hello` package, along with a service unit that runs it. ```nix -{ lib, writeText, portableService, hello }: +{ + lib, + writeText, + portableService, + hello, +}: let hello-service = writeText "hello.service" '' [Unit] @@ -151,7 +156,13 @@ To make things available globally, you must specify the `symlinks` attribute whe The following package builds on the package from [](#ex-portableService-hello) to make `/etc/ssl` available globally (this is only for illustrative purposes, because `hello` doesn't use `/etc/ssl`). ```nix -{ lib, writeText, portableService, hello, cacert }: +{ + lib, + writeText, + portableService, + hello, + cacert, +}: let hello-service = writeText "hello.service" '' [Unit] @@ -167,7 +178,10 @@ portableService { inherit (hello) version; units = [ hello-service ]; symlinks = [ - { object = "${cacert}/etc/ssl"; symlink = "/etc/ssl"; } + { + object = "${cacert}/etc/ssl"; + symlink = "/etc/ssl"; + } ]; } ``` diff --git a/doc/build-helpers/special/checkpoint-build.section.md b/doc/build-helpers/special/checkpoint-build.section.md index a1ce5608f246..036fee286a99 100644 --- a/doc/build-helpers/special/checkpoint-build.section.md +++ b/doc/build-helpers/special/checkpoint-build.section.md @@ -26,7 +26,9 @@ To change a normal derivation to a checkpoint based build, these steps must be t ## Example {#sec-checkpoint-build-example} ```nix -{ pkgs ? import {} }: +{ + pkgs ? import { }, +}: let inherit (pkgs.checkpointBuildTools) prepareCheckpointBuild @@ -39,5 +41,6 @@ let sed -i 's/Hello, world!/Hello, Nix!/g' src/hello.c ''; }); -in mkCheckpointBuild changedHello helloCheckpoint +in +mkCheckpointBuild changedHello helloCheckpoint ``` diff --git a/doc/build-helpers/special/fakenss.section.md b/doc/build-helpers/special/fakenss.section.md index c890752c0653..7b1b6f2576f2 100644 --- a/doc/build-helpers/special/fakenss.section.md +++ b/doc/build-helpers/special/fakenss.section.md @@ -48,12 +48,19 @@ It is useful with functions in `dockerTools` to allow building Docker images tha This example includes the `hello` binary in the image so it can do something besides just have the extra files. ```nix -{ dockerTools, fakeNss, hello }: +{ + dockerTools, + fakeNss, + hello, +}: dockerTools.buildImage { name = "image-with-passwd"; tag = "latest"; - copyToRoot = [ fakeNss hello ]; + copyToRoot = [ + fakeNss + hello + ]; config = { Cmd = [ "/bin/hello" ]; @@ -70,8 +77,8 @@ The following code uses `override` to add extra lines to `/etc/passwd` and `/etc ```nix { fakeNss }: fakeNss.override { - extraPasswdLines = ["newuser:x:9001:9001:new user:/var/empty:/bin/sh"]; - extraGroupLines = ["newuser:x:9001:"]; + extraPasswdLines = [ "newuser:x:9001:9001:new user:/var/empty:/bin/sh" ]; + extraGroupLines = [ "newuser:x:9001:" ]; } ``` ::: diff --git a/doc/build-helpers/special/fhs-environments.section.md b/doc/build-helpers/special/fhs-environments.section.md index 815f6cac1126..e81dbdfdc641 100644 --- a/doc/build-helpers/special/fhs-environments.section.md +++ b/doc/build-helpers/special/fhs-environments.section.md @@ -36,22 +36,29 @@ Accepted arguments are: You can create a simple environment using a `shell.nix` like this: ```nix -{ pkgs ? import {} }: +{ + pkgs ? import { }, +}: (pkgs.buildFHSEnv { name = "simple-x11-env"; - targetPkgs = pkgs: (with pkgs; [ - udev - alsa-lib - ]) ++ (with pkgs.xorg; [ - libX11 - libXcursor - libXrandr - ]); - multiPkgs = pkgs: (with pkgs; [ - udev - alsa-lib - ]); + targetPkgs = + pkgs: + (with pkgs; [ + udev + alsa-lib + ]) + ++ (with pkgs.xorg; [ + libX11 + libXcursor + libXrandr + ]); + multiPkgs = + pkgs: + (with pkgs; [ + udev + alsa-lib + ]); runScript = "bash"; }).env ``` diff --git a/doc/build-helpers/special/makesetuphook.section.md b/doc/build-helpers/special/makesetuphook.section.md index 179d8d456372..7b83653296eb 100644 --- a/doc/build-helpers/special/makesetuphook.section.md +++ b/doc/build-helpers/special/makesetuphook.section.md @@ -9,7 +9,7 @@ pkgs.makeSetupHook { name = "something-hook"; propagatedBuildInputs = [ pkgs.commandsomething ]; depsTargetTargetPropagated = [ pkgs.libsomething ]; -} ./script.sh; +} ./script.sh ``` ### setup hook that depends on the hello package and runs hello and @shell@ is substituted with path to bash {#sec-pkgs.makeSetupHook-usage-example} @@ -42,7 +42,7 @@ pkgs.makeSetupHook } preConfigureHooks+=(_printHelloHook) '' - ); + ) ``` ## Attributes {#sec-pkgs.makeSetupHook-attributes} diff --git a/doc/build-helpers/special/mkshell.section.md b/doc/build-helpers/special/mkshell.section.md index e39bef7468e3..15443660c9ff 100644 --- a/doc/build-helpers/special/mkshell.section.md +++ b/doc/build-helpers/special/mkshell.section.md @@ -8,11 +8,16 @@ repetition when using it with `nix-shell` (or `nix develop`). Here is a common usage example: ```nix -{ pkgs ? import {} }: +{ + pkgs ? import { }, +}: pkgs.mkShell { packages = [ pkgs.gnumake ]; - inputsFrom = [ pkgs.hello pkgs.gnutar ]; + inputsFrom = [ + pkgs.hello + pkgs.gnutar + ]; shellHook = '' export DEBUG=1 diff --git a/doc/build-helpers/special/vm-tools.section.md b/doc/build-helpers/special/vm-tools.section.md index 46ced7cd9990..7591f62eb462 100644 --- a/doc/build-helpers/special/vm-tools.section.md +++ b/doc/build-helpers/special/vm-tools.section.md @@ -31,25 +31,34 @@ If the build fails and Nix is run with the `-K/--keep-failed` option, a script ` Build the derivation hello inside a VM: ```nix -{ pkgs }: with pkgs; with vmTools; -runInLinuxVM hello +{ pkgs }: with pkgs; with vmTools; runInLinuxVM hello ``` Build inside a VM with extra memory: ```nix -{ pkgs }: with pkgs; with vmTools; -runInLinuxVM (hello.overrideAttrs (_: { memSize = 1024; })) +{ pkgs }: +with pkgs; +with vmTools; +runInLinuxVM ( + hello.overrideAttrs (_: { + memSize = 1024; + }) +) ``` Use VM with a disk image (implicitly sets `diskImage`, see [`vmTools.createEmptyImage`](#vm-tools-createEmptyImage)): ```nix -{ pkgs }: with pkgs; with vmTools; -runInLinuxVM (hello.overrideAttrs (_: { - preVM = createEmptyImage { - size = 1024; - fullName = "vm-image"; - }; -})) +{ pkgs }: +with pkgs; +with vmTools; +runInLinuxVM ( + hello.overrideAttrs (_: { + preVM = createEmptyImage { + size = 1024; + fullName = "vm-image"; + }; + }) +) ``` ## `vmTools.extractFs` {#vm-tools-extractFs} @@ -66,8 +75,7 @@ Takes a file, such as an ISO, and extracts its contents into the store. Extract the contents of an ISO file: ```nix -{ pkgs }: with pkgs; with vmTools; -extractFs { file = ./image.iso; } +{ pkgs }: with pkgs; with vmTools; extractFs { file = ./image.iso; } ``` ## `vmTools.extractMTDfs` {#vm-tools-extractMTDfs} @@ -86,14 +94,12 @@ Generate a script that can be used to run an interactive session in the given im Create a script for running a Fedora 27 VM: ```nix -{ pkgs }: with pkgs; with vmTools; -makeImageTestScript diskImages.fedora27x86_64 +{ pkgs }: with pkgs; with vmTools; makeImageTestScript diskImages.fedora27x86_64 ``` Create a script for running an Ubuntu 20.04 VM: ```nix -{ pkgs }: with pkgs; with vmTools; -makeImageTestScript diskImages.ubuntu2004x86_64 +{ pkgs }: with pkgs; with vmTools; makeImageTestScript diskImages.ubuntu2004x86_64 ``` ## `vmTools.diskImageFuns` {#vm-tools-diskImageFuns} @@ -137,8 +143,13 @@ A set of functions that build a predefined set of minimal Linux distributions im 8GiB image containing Firefox in addition to the default packages: ```nix -{ pkgs }: with pkgs; with vmTools; -diskImageFuns.ubuntu2004x86_64 { extraPackages = [ "firefox" ]; size = 8192; } +{ pkgs }: +with pkgs; +with vmTools; +diskImageFuns.ubuntu2004x86_64 { + extraPackages = [ "firefox" ]; + size = 8192; +} ``` ## `vmTools.diskImageExtraFuns` {#vm-tools-diskImageExtraFuns} diff --git a/doc/build-helpers/testers.chapter.md b/doc/build-helpers/testers.chapter.md index fe1a0954348d..9e46635c600c 100644 --- a/doc/build-helpers/testers.chapter.md +++ b/doc/build-helpers/testers.chapter.md @@ -98,7 +98,8 @@ It has two modes: ```nix { "https://nix\\.dev/manual/nix/[a-z0-9.-]*" = "${nix.doc}/share/doc/nix/manual"; - "https://nixos\\.org/manual/nix/(un)?stable" = "${emptyDirectory}/placeholder-to-disallow-old-nix-docs-urls"; + "https://nixos\\.org/manual/nix/(un)?stable" = + "${emptyDirectory}/placeholder-to-disallow-old-nix-docs-urls"; } ``` @@ -302,18 +303,22 @@ While `testBuildFailure` is designed to keep changes to the original builder's e # Check that a build fails, and verify the changes made during build ```nix -runCommand "example" { - failed = testers.testBuildFailure (runCommand "fail" {} '' - echo ok-ish >$out - echo failing though - exit 3 - ''); -} '' - grep -F 'ok-ish' $failed/result - grep -F 'failing though' $failed/testBuildFailure.log - [[ 3 = $(cat $failed/testBuildFailure.exit) ]] - touch $out -'' +runCommand "example" + { + failed = testers.testBuildFailure ( + runCommand "fail" { } '' + echo ok-ish >$out + echo failing though + exit 3 + '' + ); + } + '' + grep -F 'ok-ish' $failed/result + grep -F 'failing though' $failed/testBuildFailure.log + [[ 3 = $(cat $failed/testBuildFailure.exit) ]] + touch $out + '' ``` ::: @@ -396,15 +401,18 @@ testers.testEqualContents { expected = writeText "expected" '' foo baz baz ''; - actual = runCommand "actual" { - # not really necessary for a package that's in stdenv - nativeBuildInputs = [ gnused ]; - base = writeText "base" '' - foo bar baz - ''; - } '' - sed -e 's/bar/baz/g' $base >$out - ''; + actual = + runCommand "actual" + { + # not really necessary for a package that's in stdenv + nativeBuildInputs = [ gnused ]; + base = writeText "base" '' + foo bar baz + ''; + } + '' + sed -e 's/bar/baz/g' $base >$out + ''; } ``` @@ -515,10 +523,11 @@ Otherwise, the build log explains the difference via `nix-diff`. # Check that two packages produce the same derivation ```nix -testers.testEqualDerivation - "The hello package must stay the same when enabling checks." - hello - (hello.overrideAttrs(o: { doCheck = true; })) +testers.testEqualDerivation "The hello package must stay the same when enabling checks." hello ( + hello.overrideAttrs (o: { + doCheck = true; + }) +) ``` ::: @@ -586,7 +595,10 @@ testers.runCommand { curl -o /dev/null https://example.com touch $out ''; - nativeBuildInputs = with pkgs; [ cacert curl ]; + nativeBuildInputs = with pkgs; [ + cacert + curl + ]; } ``` @@ -603,15 +615,20 @@ If your test is part of the Nixpkgs repository, or if you need a more general en # Run a NixOS test using `runNixOSTest` ```nix -pkgs.testers.runNixOSTest ({ lib, ... }: { - name = "hello"; - nodes.machine = { pkgs, ... }: { - environment.systemPackages = [ pkgs.hello ]; - }; - testScript = '' - machine.succeed("hello") - ''; -}) +pkgs.testers.runNixOSTest ( + { lib, ... }: + { + name = "hello"; + nodes.machine = + { pkgs, ... }: + { + environment.systemPackages = [ pkgs.hello ]; + }; + testScript = '' + machine.succeed("hello") + ''; + } +) ``` ::: @@ -634,10 +651,17 @@ A [NixOS VM test network](https://nixos.org/nixos/manual/index.html#sec-nixos-te { name = "my-test"; nodes = { - machine1 = { lib, pkgs, nodes, ... }: { - environment.systemPackages = [ pkgs.hello ]; - services.foo.enable = true; - }; + machine1 = + { + lib, + pkgs, + nodes, + ... + }: + { + environment.systemPackages = [ pkgs.hello ]; + services.foo.enable = true; + }; # machine2 = ...; }; testScript = '' diff --git a/doc/build-helpers/trivial-build-helpers.chapter.md b/doc/build-helpers/trivial-build-helpers.chapter.md index 9e818be674b4..48ed99b2fa36 100644 --- a/doc/build-helpers/trivial-build-helpers.chapter.md +++ b/doc/build-helpers/trivial-build-helpers.chapter.md @@ -66,15 +66,17 @@ runCommandWith :: { # Invocation of `runCommandWith` ```nix -runCommandWith { - name = "example"; - derivationArgs.nativeBuildInputs = [ cowsay ]; -} '' - cowsay > $out < $out </my-program.desktop` to the Nix store. ```nix -{makeDesktopItem}: +{ makeDesktopItem }: makeDesktopItem { name = "my-program"; desktopName = "My Program"; @@ -260,7 +262,10 @@ makeDesktopItem { mimeTypes = [ "video/mp4" ]; categories = [ "Utility" ]; implements = [ "org.my-program" ]; - keywords = [ "Video" "Player" ]; + keywords = [ + "Video" + "Player" + ]; startupNotify = false; startupWMClass = "MyProgram"; prefersNonDefaultGPU = false; @@ -276,18 +281,22 @@ makeDesktopItem { Override the `hello` package to add a desktop item. ```nix -{ copyDesktopItems -, hello -, makeDesktopItem }: +{ + copyDesktopItems, + hello, + makeDesktopItem, +}: hello.overrideAttrs { nativeBuildInputs = [ copyDesktopItems ]; - desktopItems = [(makeDesktopItem { - name = "hello"; - desktopName = "Hello"; - exec = "hello"; - })]; + desktopItems = [ + (makeDesktopItem { + name = "hello"; + desktopName = "Hello"; + exec = "hello"; + }) + ]; } ``` @@ -446,10 +455,9 @@ The store path will include the name, and it will be a file. Write the string `Contents of File` to `/nix/store/`: ```nix -writeText "my-file" - '' +writeText "my-file" '' Contents of File - '' +'' ``` ::: @@ -486,10 +494,9 @@ The store path will be a directory. Write the string `Contents of File` to `/nix/store//share/my-file`: ```nix -writeTextDir "share/my-file" - '' +writeTextDir "share/my-file" '' Contents of File - '' +'' ``` ::: @@ -528,10 +535,9 @@ The store path will include the name, and it will be a file. Write the string `Contents of File` to `/nix/store/` and make the file executable. ```nix -writeScript "my-file" - '' +writeScript "my-file" '' Contents of File - '' +'' ``` This is equivalent to: @@ -570,10 +576,9 @@ The store path will include the name, and it will be a directory. # Usage of `writeScriptBin` ```nix -writeScriptBin "my-script" - '' +writeScriptBin "my-script" '' echo "hi" - '' +'' ``` ::: @@ -614,10 +619,9 @@ This function is almost exactly like [](#trivial-builder-writeScript), except th # Usage of `writeShellScript` ```nix -writeShellScript "my-script" - '' +writeShellScript "my-script" '' echo "hi" - '' +'' ``` ::: @@ -657,10 +661,9 @@ This function is a combination of [](#trivial-builder-writeShellScript) and [](# # Usage of `writeShellScriptBin` ```nix -writeShellScriptBin "my-script" - '' +writeShellScriptBin "my-script" '' echo "hi" - '' +'' ``` ::: @@ -685,26 +688,40 @@ These functions concatenate `files` to the Nix store in a single file. This is u Here are a few examples: ```nix - # Writes my-file to /nix/store/ -concatTextFile { - name = "my-file"; - files = [ drv1 "${drv2}/path/to/file" ]; -} -# See also the `concatText` helper function below. +concatTextFile + { + name = "my-file"; + files = [ + drv1 + "${drv2}/path/to/file" + ]; + } + # See also the `concatText` helper function below. -# Writes executable my-file to /nix/store//bin/my-file -concatTextFile { - name = "my-file"; - files = [ drv1 "${drv2}/path/to/file" ]; - executable = true; - destination = "/bin/my-file"; -} -# Writes contents of files to /nix/store/ -concatText "my-file" [ file1 file2 ] + # Writes executable my-file to /nix/store//bin/my-file + concatTextFile + { + name = "my-file"; + files = [ + drv1 + "${drv2}/path/to/file" + ]; + executable = true; + destination = "/bin/my-file"; + } + # Writes contents of files to /nix/store/ + concatText + "my-file" + [ file1 file2 ] -# Writes contents of files to /nix/store/ -concatScript "my-file" [ file1 file2 ] + # Writes contents of files to /nix/store/ + concatScript + "my-file" + [ + file1 + file2 + ] ``` ## `writeShellApplication` {#trivial-builder-writeShellApplication} @@ -722,7 +739,10 @@ For example, the following shell application can refer to `curl` directly, rathe writeShellApplication { name = "show-nixos-org"; - runtimeInputs = [ curl w3m ]; + runtimeInputs = [ + curl + w3m + ]; text = '' curl -s 'https://nixos.org' | w3m -dump -T text/html @@ -736,7 +756,14 @@ This can be used to put many derivations into the same directory structure. It w Here is an example: ```nix # adds symlinks of hello and stack to current build and prints "links added" -symlinkJoin { name = "myexample"; paths = [ pkgs.hello pkgs.stack ]; postBuild = "echo links added"; } +symlinkJoin { + name = "myexample"; + paths = [ + pkgs.hello + pkgs.stack + ]; + postBuild = "echo links added"; +} ``` This creates a derivation with a directory structure like the following: ``` diff --git a/doc/doc-support/package.nix b/doc/doc-support/package.nix index f316656a585c..dfe7a3c4cc9b 100644 --- a/doc/doc-support/package.nix +++ b/doc/doc-support/package.nix @@ -12,6 +12,7 @@ nixos-render-docs-redirects, writeShellScriptBin, nixpkgs ? { }, + markdown-code-runner, }: stdenvNoCC.mkDerivation ( @@ -119,10 +120,14 @@ stdenvNoCC.mkDerivation ( packages = [ devmode' nixos-render-docs-redirects' + markdown-code-runner ]; }; - tests.manpage-urls = callPackage ../tests/manpage-urls.nix { }; + tests = { + manpage-urls = callPackage ../tests/manpage-urls.nix { }; + check-nix-code-blocks = callPackage ../tests/check-nix-code-blocks.nix { }; + }; }; } ) diff --git a/doc/functions/generators.section.md b/doc/functions/generators.section.md index 9d71a0240108..f636d00cc258 100644 --- a/doc/functions/generators.section.md +++ b/doc/functions/generators.section.md @@ -13,17 +13,23 @@ let # specifies how to format a key/value pair mkKeyValue = generators.mkKeyValueDefault { # specifies the generated string for a subset of nix values - mkValueString = v: - if v == true then ''"yes"'' - else if v == false then ''"no"'' - else if isString v then ''"${v}"'' + mkValueString = + v: + if v == true then + ''"yes"'' + else if v == false then + ''"no"'' + else if isString v then + ''"${v}"'' # and delegates all other values to the default generator - else generators.mkValueStringDefault {} v; + else + generators.mkValueStringDefault { } v; } ":"; }; -# the INI file can now be given as plain old nix values -in customToINI { + # the INI file can now be given as plain old nix values +in +customToINI { main = { pushinfo = true; autopush = false; diff --git a/doc/functions/nix-gitignore.section.md b/doc/functions/nix-gitignore.section.md index 8532ab68ac04..416b5435fa58 100644 --- a/doc/functions/nix-gitignore.section.md +++ b/doc/functions/nix-gitignore.section.md @@ -7,20 +7,23 @@ `pkgs.nix-gitignore` exports a number of functions, but you'll most likely need either `gitignoreSource` or `gitignoreSourcePure`. As their first argument, they both accept either 1. a file with gitignore lines or 2. a string with gitignore lines, or 3. a list of either of the two. They will be concatenated into a single big string. ```nix -{ pkgs ? import {} }: { +{ + pkgs ? import { }, +}: +{ - src = nix-gitignore.gitignoreSource [] ./source; - # Simplest version + src = nix-gitignore.gitignoreSource [ ] ./source; + # Simplest version - src = nix-gitignore.gitignoreSource "supplemental-ignores\n" ./source; - # This one reads the ./source/.gitignore and concats the auxiliary ignores + src = nix-gitignore.gitignoreSource "supplemental-ignores\n" ./source; + # This one reads the ./source/.gitignore and concats the auxiliary ignores - src = nix-gitignore.gitignoreSourcePure "ignore-this\nignore-that\n" ./source; - # Use this string as gitignore, don't read ./source/.gitignore. + src = nix-gitignore.gitignoreSourcePure "ignore-this\nignore-that\n" ./source; + # Use this string as gitignore, don't read ./source/.gitignore. - src = nix-gitignore.gitignoreSourcePure ["ignore-this\nignore-that\n" ~/.gitignore] ./source; - # It also accepts a list (of strings and paths) that will be concatenated - # once the paths are turned to strings via readFile. + src = nix-gitignore.gitignoreSourcePure [ "ignore-this\nignore-that\n" ~/.gitignore ] ./source; + # It also accepts a list (of strings and paths) that will be concatenated + # once the paths are turned to strings via readFile. } ``` diff --git a/doc/functions/prefer-remote-fetch.section.md b/doc/functions/prefer-remote-fetch.section.md index 8760c100224a..b3d4a84eb4fd 100644 --- a/doc/functions/prefer-remote-fetch.section.md +++ b/doc/functions/prefer-remote-fetch.section.md @@ -3,8 +3,7 @@ `prefer-remote-fetch` is an overlay that download sources on remote builder. This is useful when the evaluating machine has a slow upload while the builder can fetch faster directly from the source. To use it, put the following snippet as a new overlay: ```nix -self: super: - (super.prefer-remote-fetch self super) +self: super: (super.prefer-remote-fetch self super) ``` A full configuration example for that sets the overlay up for your own account, could look like this diff --git a/doc/hooks/autopatchcil.section.md b/doc/hooks/autopatchcil.section.md new file mode 100644 index 000000000000..f7ed8cb6835f --- /dev/null +++ b/doc/hooks/autopatchcil.section.md @@ -0,0 +1,17 @@ +# autoPatchcilHook {#setup-hook-autopatchcilhook} + +This is a special setup hook which helps in packaging .NET assemblies/programs in that it automatically tries to find missing shared library dependencies of .NET assemblies based on the given `buildInputs` and `nativeBuildInputs`. + +As the hook needs information for the host where the package will be run on, there's a required environment variable called `autoPatchcilRuntimeId` which should be filled in with the RID (Runtime Identifier) of the machine where the output will be run on. If you're using `buildDotnetModule`, it will fall back to `dotnetRuntimeIds` (which is set to `lib.singleton (if runtimeId != null then runtimeId else systemToDotnetRid stdenvNoCC.hostPlatform.system)`) for you if not provided. + +In certain situations you may want to run the main command (`autoPatchcil`) of the setup hook on a file or a set of directories instead of unconditionally patching all outputs. This can be done by setting the `dontAutoPatchcil` environment variable to a non-empty value. + +By default, `autoPatchcil` will fail as soon as any .NET assembly requires a dependency which cannot be resolved via the given build inputs. In some situations you might prefer to just leave missing dependencies unpatched and continue to patch the rest. This can be achieved by setting the `autoPatchcilIgnoreMissingDeps` environment variable to a non-empty value. `autoPatchcilIgnoreMissingDeps` can be set to a list like `autoPatchcilIgnoreMissingDeps = [ "libcuda.so.1" "libcudart.so.1" ];` or to `[ "*" ]` to ignore all missing dependencies. + +The `autoPatchcil` command requires the `--rid` command line flag, informing the RID (Runtime Identifier) it should assume the assemblies will be executed on, and also recognizes a `--no-recurse` command line flag, which prevents it from recursing into subdirectories. + +::: {.note} +Since, unlike most native binaries, .NET assemblies are compiled once to run on any platform, many assemblies may have PInvoke stubs for libraries that might not be available on the platform that the package will effectively run on. A few examples are assemblies that call native Windows APIs through PInvoke targeting `kernel32`, `gdi32`, `user32`, `shell32` or `ntdll`. + +`autoPatchcil` does its best to ignore dependencies from other platforms by checking the requested file extensions, however not all PInvoke stubs provide an extension so in those cases it will be necessary to list those in `autoPatchcilIgnoreMissingDeps` manually. +::: diff --git a/doc/hooks/index.md b/doc/hooks/index.md index e4b744056c5e..574b7eea8de3 100644 --- a/doc/hooks/index.md +++ b/doc/hooks/index.md @@ -7,6 +7,7 @@ The stdenv built-in hooks are documented in [](#ssec-setup-hooks). ```{=include=} sections autoconf.section.md automake.section.md +autopatchcil.section.md autopatchelf.section.md aws-c-common.section.md bmake.section.md diff --git a/doc/hooks/memcached-test-hook.section.md b/doc/hooks/memcached-test-hook.section.md index 6820cec20a1c..03fc91ab4bf0 100644 --- a/doc/hooks/memcached-test-hook.section.md +++ b/doc/hooks/memcached-test-hook.section.md @@ -20,13 +20,15 @@ stdenv.mkDerivation { If you use a custom `checkPhase`, remember to add the `runHook` calls: ```nix - checkPhase '' +{ + checkPhase = '' runHook preCheck # ... your tests runHook postCheck - '' + ''; +} ``` ## Variables {#sec-memcachedTestHook-variables} @@ -48,6 +50,6 @@ stdenv.mkDerivation { ]; preCheck = '' - memcachedTestPort=1234 - '' + memcachedTestPort=1234; + ''; } diff --git a/doc/hooks/mpi-check-hook.section.md b/doc/hooks/mpi-check-hook.section.md index c182c4cc6195..299069fc89ba 100644 --- a/doc/hooks/mpi-check-hook.section.md +++ b/doc/hooks/mpi-check-hook.section.md @@ -11,15 +11,15 @@ the neceesary environment variables to use Example: ```nix - { mpiCheckPhaseHook, mpi, ... }: - { - # ... +{ mpiCheckPhaseHook, mpi, ... }: +{ + # ... - nativeCheckInputs = [ - openssh - mpiCheckPhaseHook - ]; - } + nativeCheckInputs = [ + openssh + mpiCheckPhaseHook + ]; +} ``` diff --git a/doc/hooks/patch-rc-path-hooks.section.md b/doc/hooks/patch-rc-path-hooks.section.md index 5c870dc782c2..080a03da72d6 100644 --- a/doc/hooks/patch-rc-path-hooks.section.md +++ b/doc/hooks/patch-rc-path-hooks.section.md @@ -29,7 +29,11 @@ Given a package `foo` containing an init script `this-foo.fish` that depends on patch the init script for users to source without having the above dependencies in their `PATH`: ```nix -{ lib, stdenv, patchRcPathFish}: +{ + lib, + stdenv, + patchRcPathFish, +}: stdenv.mkDerivation { # ... @@ -39,7 +43,13 @@ stdenv.mkDerivation { ]; postFixup = '' - patchRcPathFish $out/bin/this-foo.fish ${lib.makeBinPath [ coreutils man which ]} + patchRcPathFish $out/bin/this-foo.fish ${ + lib.makeBinPath [ + coreutils + man + which + ] + } ''; } ``` diff --git a/doc/hooks/postgresql-test-hook.section.md b/doc/hooks/postgresql-test-hook.section.md index 59d7f7a644c9..8b3cc5f03f3e 100644 --- a/doc/hooks/postgresql-test-hook.section.md +++ b/doc/hooks/postgresql-test-hook.section.md @@ -4,7 +4,11 @@ This hook starts a PostgreSQL server during the `checkPhase`. Example: ```nix -{ stdenv, postgresql, postgresqlTestHook }: +{ + stdenv, + postgresql, + postgresqlTestHook, +}: stdenv.mkDerivation { # ... @@ -18,13 +22,13 @@ stdenv.mkDerivation { If you use a custom `checkPhase`, remember to add the `runHook` calls: ```nix - checkPhase '' - runHook preCheck +checkPhase '' + runHook preCheck - # ... your tests + # ... your tests - runHook postCheck - '' + runHook postCheck +'' ``` ## Variables {#sec-postgresqlTestHook-variables} diff --git a/doc/hooks/redis-test-hook.section.md b/doc/hooks/redis-test-hook.section.md index b14d29801a0e..7971b29fa10a 100644 --- a/doc/hooks/redis-test-hook.section.md +++ b/doc/hooks/redis-test-hook.section.md @@ -7,7 +7,7 @@ This hook starts a Redis server during `checkPhase`. Example: { stdenv, redis, - redisTestHook + redisTestHook, }: stdenv.mkDerivation { @@ -21,13 +21,15 @@ stdenv.mkDerivation { If you use a custom `checkPhase`, remember to add the `runHook` calls: ```nix - checkPhase '' +{ + checkPhase = '' runHook preCheck # ... your tests runHook postCheck - '' + ''; +} ``` ## Variables {#sec-redisTestHook-variables} @@ -45,7 +47,11 @@ Bash-only variables: Example usage: ```nix -{ stdenv, redis, redisTestHook }: +{ + stdenv, + redis, + redisTestHook, +}: stdenv.mkDerivation { # ... @@ -55,6 +61,7 @@ stdenv.mkDerivation { ]; preCheck = '' - redisTestPort=6390 - '' + redisTestPort=6390; + ''; } +``` diff --git a/doc/hooks/versionCheckHook.section.md b/doc/hooks/versionCheckHook.section.md index 6c45b37cd17b..16b1ee97e890 100644 --- a/doc/hooks/versionCheckHook.section.md +++ b/doc/hooks/versionCheckHook.section.md @@ -9,7 +9,7 @@ You use it like this: lib, stdenv, versionCheckHook, - # ... +# ... }: stdenv.mkDerivation (finalAttrs: { diff --git a/doc/hooks/zig.section.md b/doc/hooks/zig.section.md index 8bef293769e5..1c52e9827b41 100644 --- a/doc/hooks/zig.section.md +++ b/doc/hooks/zig.section.md @@ -7,9 +7,10 @@ In Nixpkgs, `zig.hook` overrides the default build, check and install phases. ## Example code snippet {#zig-hook-example-code-snippet} ```nix -{ lib -, stdenv -, zig +{ + lib, + stdenv, + zig, }: stdenv.mkDerivation { diff --git a/doc/interoperability/cyclonedx.md b/doc/interoperability/cyclonedx.md index 7a3dea3dbc2f..3c141b86d9f9 100644 --- a/doc/interoperability/cyclonedx.md +++ b/doc/interoperability/cyclonedx.md @@ -63,17 +63,27 @@ For example, the `fetchFromGitHub` is commonly used within Nixpkgs but should be `nix:fod` properties may be extracted and evaluated to a derivation using code similar to the following, assuming a fictitious function `filterPropertiesToAttrs`: ```nix -{ pkgs, filterPropertiesToAttrs, properties }: +{ + pkgs, + filterPropertiesToAttrs, + properties, +}: let fodProps = filterPropertiesToAttrs "nix:fod:" properties; methods = { fetchzip = - { name, url, sha256, ... }: + { + name, + url, + sha256, + ... + }: pkgs.fetchzip { inherit name url sha256; }; }; -in methods.${fodProps.method} fodProps +in +methods.${fodProps.method} fodProps ``` diff --git a/doc/languages-frameworks/agda.section.md b/doc/languages-frameworks/agda.section.md index 33fffc60c8db..95b8afcbd1c0 100644 --- a/doc/languages-frameworks/agda.section.md +++ b/doc/languages-frameworks/agda.section.md @@ -48,7 +48,7 @@ You can also reference a GitHub repository agda.withPackages (p: [ (p.standard-library.overrideAttrs (oldAttrs: { version = "1.5"; - src = fetchFromGitHub { + src = fetchFromGitHub { repo = "agda-stdlib"; owner = "agda"; rev = "v1.5"; @@ -114,7 +114,9 @@ This can be overridden by a different version of `ghc` as follows: ```nix agda.withPackages { - pkgs = [ /* ... */ ]; + pkgs = [ + # ... + ]; ghc = haskell.compiler.ghcHEAD; } ``` @@ -132,8 +134,10 @@ A derivation can then be written using `agdaPackages.mkDerivation`. This has sim Here is an example `default.nix` ```nix -{ nixpkgs ? }: -with (import nixpkgs {}); +{ + nixpkgs ? , +}: +with (import nixpkgs { }); agdaPackages.mkDerivation { version = "1.0"; pname = "my-agda-lib"; @@ -179,8 +183,12 @@ the Agda package set is small and can (still) be maintained by hand. To add an Agda package to `nixpkgs`, the derivation should be written to `pkgs/development/libraries/agda/${library-name}/` and an entry should be added to `pkgs/top-level/agda-packages.nix`. Here it is called in a scope with access to all other Agda libraries, so the top line of the `default.nix` can look like: ```nix -{ mkDerivation, standard-library, fetchFromGitHub }: -{} +{ + mkDerivation, + standard-library, + fetchFromGitHub, +}: +{ } ``` Note that the derivation function is called with `mkDerivation` set to `agdaPackages.mkDerivation`, therefore you diff --git a/doc/languages-frameworks/android.section.md b/doc/languages-frameworks/android.section.md index b640ba8d5011..f970776a9b8d 100644 --- a/doc/languages-frameworks/android.section.md +++ b/doc/languages-frameworks/android.section.md @@ -8,23 +8,31 @@ supporting features. Use the `android-studio-full` attribute for a very complete Android SDK, including system images: ```nix -buildInputs = [ android-studio-full ]; +{ + buildInputs = [ android-studio-full ]; +} ``` This is identical to: ```nix -buildInputs = [ androidStudioPackages.stable.full ]; +{ + buildInputs = [ androidStudioPackages.stable.full ]; +} ``` Alternatively, you can pass composeAndroidPackages to the `withSdk` passthru: ```nix -buildInputs = [ - (android-studio.withSdk (androidenv.composeAndroidPackages { - includeNDK = true; - }).androidsdk) -]; +{ + buildInputs = [ + (android-studio.withSdk + (androidenv.composeAndroidPackages { + includeNDK = true; + }).androidsdk + ) + ]; +} ``` These will export `ANDROID_SDK_ROOT` and `ANDROID_NDK_ROOT` to the SDK and NDK directories @@ -35,13 +43,19 @@ in the specified Android build environment. Alternatively, you can deploy the SDK separately with a desired set of plugins, or subsets of an SDK. ```nix -with import {}; +with import { }; let androidComposition = androidenv.composeAndroidPackages { - platformVersions = [ "34" "35" ]; + platformVersions = [ + "34" + "35" + ]; systemImageTypes = [ "google_apis_playstore" ]; - abiVersions = [ "armeabi-v7a" "arm64-v8a" ]; + abiVersions = [ + "armeabi-v7a" + "arm64-v8a" + ]; includeNDK = true; includeExtras = [ "extras;google;auto" @@ -165,7 +179,7 @@ We can also deploy subsets of the Android SDK. For example, to only the `platform-tools` package, you can evaluate the following expression: ```nix -with import {}; +with import { }; let androidComposition = androidenv.composeAndroidPackages { @@ -183,7 +197,7 @@ to use a predefined composition that contains a fairly complete set of Android p The following Nix expression can be used to deploy the entire SDK: ```nix -with import {}; +with import { }; androidenv.androidPkgs.androidsdk ``` @@ -191,7 +205,7 @@ androidenv.androidPkgs.androidsdk It is also possible to use one plugin only: ```nix -with import {}; +with import { }; androidenv.androidPkgs.platform-tools ``` @@ -205,7 +219,7 @@ An emulator spawn script can be configured by invoking the `emulateApp {}` function: ```nix -with import {}; +with import { }; androidenv.emulateApp { name = "emulate-MyAndroidApp"; @@ -221,7 +235,7 @@ It is also possible to specify an APK to deploy inside the emulator and the package and activity names to launch it: ```nix -with import {}; +with import { }; androidenv.emulateApp { name = "emulate-MyAndroidApp"; @@ -344,7 +358,7 @@ requires. Most newer Android projects use Gradle, and this is included for histo purposes. ```nix -with import {}; +with import { }; androidenv.buildApp { name = "MyAndroidApp"; diff --git a/doc/languages-frameworks/astal.section.md b/doc/languages-frameworks/astal.section.md index 34022b9c5850..9b2d59a1c009 100644 --- a/doc/languages-frameworks/astal.section.md +++ b/doc/languages-frameworks/astal.section.md @@ -11,7 +11,9 @@ ags.bundle { pname = "hyprpanel"; version = "1.0.0"; - src = fetchFromGitHub { ... }; + src = fetchFromGitHub { + #... + }; # change your entry file (default is `app.ts`) entry = "app.ts"; @@ -32,7 +34,9 @@ ags.bundle { # GTK 4 support is opt-in enableGtk4 = true; - meta = { ... }; + meta = { + #... + }; } ``` diff --git a/doc/languages-frameworks/beam.section.md b/doc/languages-frameworks/beam.section.md index 6c88278def19..a7882ba25f57 100644 --- a/doc/languages-frameworks/beam.section.md +++ b/doc/languages-frameworks/beam.section.md @@ -60,7 +60,10 @@ $ nix-shell -p beamPackages.rebar3 ```nix let - pkgs = import { config = {}; overlays = []; }; + pkgs = import { + config = { }; + overlays = [ ]; + }; in pkgs.mkShell { packages = [ pkgs.beamPackages.rebar3 ]; @@ -120,26 +123,28 @@ If there are git dependencies. { mixNixDeps = import ./mix.nix { inherit beamPackages lib; - overrides = (final: prev: { - # mix2nix does not support git dependencies yet, - # so we need to add them manually - prometheus_ex = beamPackages.buildMix rec { - name = "prometheus_ex"; - version = "3.0.5"; + overrides = ( + final: prev: { + # mix2nix does not support git dependencies yet, + # so we need to add them manually + prometheus_ex = beamPackages.buildMix rec { + name = "prometheus_ex"; + version = "3.0.5"; - # Change the argument src with the git src that you actually need - src = fetchFromGitLab { - domain = "git.pleroma.social"; - group = "pleroma"; - owner = "elixir-libraries"; - repo = "prometheus.ex"; - rev = "a4e9beb3c1c479d14b352fd9d6dd7b1f6d7deee5"; - hash = "sha256-U17LlN6aGUKUFnT4XyYXppRN+TvUBIBRHEUsfeIiGOw="; + # Change the argument src with the git src that you actually need + src = fetchFromGitLab { + domain = "git.pleroma.social"; + group = "pleroma"; + owner = "elixir-libraries"; + repo = "prometheus.ex"; + rev = "a4e9beb3c1c479d14b352fd9d6dd7b1f6d7deee5"; + hash = "sha256-U17LlN6aGUKUFnT4XyYXppRN+TvUBIBRHEUsfeIiGOw="; + }; + # you can re-use the same beamDeps argument as generated + beamDeps = with final; [ prometheus ]; }; - # you can re-use the same beamDeps argument as generated - beamDeps = with final; [ prometheus ]; - }; - }); + } + ); }; } ``` @@ -195,15 +200,21 @@ let hash = lib.fakeHash; mixEnv = ""; # default is "prod", when empty includes all dependencies, such as "dev", "test". # if you have build time environment variables add them here - MY_ENV_VAR="my_value"; + MY_ENV_VAR = "my_value"; }; nodeDependencies = (pkgs.callPackage ./assets/default.nix { }).shell.nodeDependencies; -in packages.mixRelease { - inherit src pname version mixFodDeps; +in +packages.mixRelease { + inherit + src + pname + version + mixFodDeps + ; # if you have build time environment variables add them here - MY_ENV_VAR="my_value"; + MY_ENV_VAR = "my_value"; postBuild = '' ln -sf ${nodeDependencies}/lib/node_modules assets/node_modules @@ -231,7 +242,12 @@ In order to create a service with your release, you could add a `service.nix` in your project with the following ```nix -{config, pkgs, lib, ...}: +{ + config, + pkgs, + lib, + ... +}: let release = pkgs.callPackage ./default.nix; @@ -241,10 +257,16 @@ in { systemd.services.${release_name} = { wantedBy = [ "multi-user.target" ]; - after = [ "network.target" "postgresql.service" ]; + after = [ + "network.target" + "postgresql.service" + ]; # note that if you are connecting to a postgres instance on a different host # postgresql.service should not be included in the requires. - requires = [ "network-online.target" "postgresql.service" ]; + requires = [ + "network-online.target" + "postgresql.service" + ]; description = "my app"; environment = { # RELEASE_TMP is used to write the state of the @@ -292,7 +314,9 @@ in Usually, we need to create a `shell.nix` file and do our development inside of the environment specified therein. Just install your version of Erlang and any other interpreters, and then use your normal build tools. As an example with Elixir: ```nix -{ pkgs ? import {} }: +{ + pkgs ? import { }, +}: with pkgs; let @@ -311,12 +335,14 @@ If you need to use an overlay to change some attributes of a derivation, e.g. if ```nix let - elixir_1_18_1_overlay = (self: super: { + elixir_1_18_1_overlay = ( + self: super: { elixir_1_18 = super.elixir_1_18.override { version = "1.18.1"; sha256 = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="; }; - }); + } + ); pkgs = import { overlays = [ elixir_1_18_1_overlay ]; }; in with pkgs; @@ -349,9 +375,16 @@ let nodePackages.prettier ]; - inputs = basePackages ++ lib.optionals stdenv.hostPlatform.isLinux [ inotify-tools ] - ++ lib.optionals stdenv.hostPlatform.isDarwin - (with darwin.apple_sdk.frameworks; [ CoreFoundation CoreServices ]); + inputs = + basePackages + ++ lib.optionals stdenv.hostPlatform.isLinux [ inotify-tools ] + ++ lib.optionals stdenv.hostPlatform.isDarwin ( + with darwin.apple_sdk.frameworks; + [ + CoreFoundation + CoreServices + ] + ); # define shell startup command hooks = '' @@ -380,7 +413,8 @@ let export ENV_VAR="your_env_var" ''; -in mkShell { +in +mkShell { buildInputs = inputs; shellHook = hooks; } diff --git a/doc/languages-frameworks/bower.section.md b/doc/languages-frameworks/bower.section.md index 346852c49426..9e12afc68273 100644 --- a/doc/languages-frameworks/bower.section.md +++ b/doc/languages-frameworks/bower.section.md @@ -24,11 +24,15 @@ Running `bower2nix` will produce something like the following output: ```nix { fetchbower, buildEnv }: -buildEnv { name = "bower-env"; ignoreCollisions = true; paths = [ - (fetchbower "angular" "1.5.3" "~1.5.0" "1749xb0firxdra4rzadm4q9x90v6pzkbd7xmcyjk6qfza09ykk9y") - (fetchbower "bootstrap" "3.3.6" "~3.3.6" "1vvqlpbfcy0k5pncfjaiskj3y6scwifxygfqnw393sjfxiviwmbv") - (fetchbower "jquery" "2.2.2" "1.9.1 - 2" "10sp5h98sqwk90y4k6hbdviwqzvzwqf47r3r51pakch5ii2y7js1") -]; } +buildEnv { + name = "bower-env"; + ignoreCollisions = true; + paths = [ + (fetchbower "angular" "1.5.3" "~1.5.0" "1749xb0firxdra4rzadm4q9x90v6pzkbd7xmcyjk6qfza09ykk9y") + (fetchbower "bootstrap" "3.3.6" "~3.3.6" "1vvqlpbfcy0k5pncfjaiskj3y6scwifxygfqnw393sjfxiviwmbv") + (fetchbower "jquery" "2.2.2" "1.9.1 - 2" "10sp5h98sqwk90y4k6hbdviwqzvzwqf47r3r51pakch5ii2y7js1") + ]; +} ``` Using the `bower2nix` command line arguments, the output can be redirected to a file. A name like `bower-packages.nix` would be fine. @@ -80,8 +84,12 @@ gulp.task('build', [], function () { ### Example Full example — default.nix {#ex-buildBowerComponentsDefaultNix} ```nix -{ myWebApp ? { outPath = ./.; name = "myWebApp"; } -, pkgs ? import {} +{ + myWebApp ? { + outPath = ./.; + name = "myWebApp"; + }, + pkgs ? import { }, }: pkgs.stdenv.mkDerivation { @@ -90,7 +98,8 @@ pkgs.stdenv.mkDerivation { buildInputs = [ pkgs.nodePackages.gulp ]; - bowerComponents = pkgs.buildBowerComponents { # note 1 + bowerComponents = pkgs.buildBowerComponents { + # note 1 name = "my-web-app"; generated = ./bower-packages.nix; src = myWebApp; diff --git a/doc/languages-frameworks/chicken.section.md b/doc/languages-frameworks/chicken.section.md index d1e12e2cccbc..78a4469a8e1d 100644 --- a/doc/languages-frameworks/chicken.section.md +++ b/doc/languages-frameworks/chicken.section.md @@ -60,19 +60,23 @@ all the other eggs: ```nix let - myChickenPackages = pkgs.chickenPackages.overrideScope (self: super: { + myChickenPackages = pkgs.chickenPackages.overrideScope ( + self: super: { # The chicken package itself can be overridden to effect the whole ecosystem. # chicken = super.chicken.overrideAttrs { # src = ... # }; - chickenEggs = super.chickenEggs.overrideScope (eggself: eggsuper: { - srfi-180 = eggsuper.srfi-180.overrideAttrs { - # path to a local copy of srfi-180 - src = <...>; - }; - }); - }); + chickenEggs = super.chickenEggs.overrideScope ( + eggself: eggsuper: { + srfi-180 = eggsuper.srfi-180.overrideAttrs { + # path to a local copy of srfi-180 + src = <...>; + }; + } + ); + } + ); in # Here, `myChickenPackages.chickenEggs.json-rpc`, which depends on `srfi-180` will use # the local copy of `srfi-180`. diff --git a/doc/languages-frameworks/coq.section.md b/doc/languages-frameworks/coq.section.md index ca983eec4f0d..c08ed2bc6f43 100644 --- a/doc/languages-frameworks/coq.section.md +++ b/doc/languages-frameworks/coq.section.md @@ -54,35 +54,78 @@ It also takes other standard `mkDerivation` attributes, they are added as such, Here is a simple package example. It is a pure Coq library, thus it depends on Coq. It builds on the Mathematical Components library, thus it also takes some `mathcomp` derivations as `extraBuildInputs`. ```nix -{ lib, mkCoqDerivation, version ? null -, coq, mathcomp, mathcomp-finmap, mathcomp-bigenough }: +{ + lib, + mkCoqDerivation, + version ? null, + coq, + mathcomp, + mathcomp-finmap, + mathcomp-bigenough, +}: mkCoqDerivation { - /* namePrefix leads to e.g. `name = coq8.11-mathcomp1.11-multinomials-1.5.2` */ - namePrefix = [ "coq" "mathcomp" ]; + # namePrefix leads to e.g. `name = coq8.11-mathcomp1.11-multinomials-1.5.2` + namePrefix = [ + "coq" + "mathcomp" + ]; pname = "multinomials"; owner = "math-comp"; inherit version; - defaultVersion = with lib.versions; lib.switch [ coq.version mathcomp.version ] [ - { cases = [ (range "8.7" "8.12") (isEq "1.11") ]; out = "1.5.2"; } - { cases = [ (range "8.7" "8.11") (range "1.8" "1.10") ]; out = "1.5.0"; } - { cases = [ (range "8.7" "8.10") (range "1.8" "1.10") ]; out = "1.4"; } - { cases = [ (isEq "8.6") (range "1.6" "1.7") ]; out = "1.1"; } - ] null; + defaultVersion = + with lib.versions; + lib.switch + [ coq.version mathcomp.version ] + [ + { + cases = [ + (range "8.7" "8.12") + (isEq "1.11") + ]; + out = "1.5.2"; + } + { + cases = [ + (range "8.7" "8.11") + (range "1.8" "1.10") + ]; + out = "1.5.0"; + } + { + cases = [ + (range "8.7" "8.10") + (range "1.8" "1.10") + ]; + out = "1.4"; + } + { + cases = [ + (isEq "8.6") + (range "1.6" "1.7") + ]; + out = "1.1"; + } + ] + null; release = { "1.5.2".hash = "sha256-mjCx9XKa38Nz9E6wNK7YSqHdJ7YTua5fD3d6J4e7WpU="; "1.5.1".hash = "sha256-Q8tm0y2FQAt2V1kZYkDlHWRia/lTvXAMVjdmzEV11I4="; "1.5.0".hash = "sha256-HIK0f21G69oEW8JG46gSBde/Q2LR3GiBCv680gHbmRg="; - "1.5.0".rev = "1.5"; - "1.4".hash = "sha256-F9g3MSIr3B6UZ3p8QWjz3/Jpw9sudJ+KRlvjiHSO024="; - "1.3".hash = "sha256-BPJTlAL0ETHvLMBslE0KFVt3DNoaGuMrHt2SBGyJe1A="; - "1.2".hash = "sha256-mHXBXSLYO4BN+jfN50y/+XCx0Qq5g4Ac2Y/qlsbgAdY="; - "1.1".hash = "sha256-ejAsMQbB/LtU9j+g160VdGXULrCe9s0gBWzyhKqmCuE="; - "1.0".hash = "sha256-tZTOltEBBKWciDxDMs/Ye4Jnq/33CANrHJ4FBMPtq+I="; + "1.5.0".rev = "1.5"; + "1.4".hash = "sha256-F9g3MSIr3B6UZ3p8QWjz3/Jpw9sudJ+KRlvjiHSO024="; + "1.3".hash = "sha256-BPJTlAL0ETHvLMBslE0KFVt3DNoaGuMrHt2SBGyJe1A="; + "1.2".hash = "sha256-mHXBXSLYO4BN+jfN50y/+XCx0Qq5g4Ac2Y/qlsbgAdY="; + "1.1".hash = "sha256-ejAsMQbB/LtU9j+g160VdGXULrCe9s0gBWzyhKqmCuE="; + "1.0".hash = "sha256-tZTOltEBBKWciDxDMs/Ye4Jnq/33CANrHJ4FBMPtq+I="; }; - propagatedBuildInputs = - [ mathcomp.ssreflect mathcomp.algebra mathcomp-finmap mathcomp-bigenough ]; + propagatedBuildInputs = [ + mathcomp.ssreflect + mathcomp.algebra + mathcomp-finmap + mathcomp-bigenough + ]; meta = { description = "Coq/SSReflect Library for Monoidal Rings and Multinomials"; @@ -124,12 +167,10 @@ The `overrideCoqDerivation` function lets you easily change arguments to `mkCoqD For example, here is how you could locally add a new release of the `multinomials` library, and set the `defaultVersion` to use this release: ```nix -coqPackages.lib.overrideCoqDerivation - { - defaultVersion = "2.0"; - release."2.0".hash = "sha256-czoP11rtrIM7+OLdMisv2EF7n/IbGuwFxHiPtg3qCNM="; - } - coqPackages.multinomials +coqPackages.lib.overrideCoqDerivation { + defaultVersion = "2.0"; + release."2.0".hash = "sha256-czoP11rtrIM7+OLdMisv2EF7n/IbGuwFxHiPtg3qCNM="; +} coqPackages.multinomials ``` ### `.overrideAttrs` {#coq-overrideAttrs} @@ -140,8 +181,10 @@ For instance, here is how you could add some code to be performed in the derivat ```nix coqPackages.multinomials.overrideAttrs (oldAttrs: { - postInstall = oldAttrs.postInstall or "" + '' - echo "you can do anything you want here" - ''; + postInstall = + oldAttrs.postInstall or "" + + '' + echo "you can do anything you want here" + ''; }) ``` diff --git a/doc/languages-frameworks/crystal.section.md b/doc/languages-frameworks/crystal.section.md index 9953f357048a..5ea70319dd49 100644 --- a/doc/languages-frameworks/crystal.section.md +++ b/doc/languages-frameworks/crystal.section.md @@ -18,7 +18,7 @@ This should have generated a `shards.nix` file. Next create a Nix file for your derivation and use `pkgs.crystal.buildCrystalPackage` as follows: ```nix -with import {}; +with import { }; crystal.buildCrystalPackage rec { pname = "mint"; version = "0.5.0"; @@ -51,14 +51,17 @@ Additionally you can override the default `crystal build` options (which are cur ```nix { - crystalBinaries.mint.options = [ "--release" "--verbose" ]; + crystalBinaries.mint.options = [ + "--release" + "--verbose" + ]; } ``` Depending on the project, you might need additional steps to get it to compile successfully. In Mint's case, we need to link against openssl, so in the end the Nix file looks as follows: ```nix -with import {}; +with import { }; crystal.buildCrystalPackage rec { version = "0.5.0"; pname = "mint"; diff --git a/doc/languages-frameworks/cuda.section.md b/doc/languages-frameworks/cuda.section.md index bb394a243b79..091fc57a53a0 100644 --- a/doc/languages-frameworks/cuda.section.md +++ b/doc/languages-frameworks/cuda.section.md @@ -12,11 +12,13 @@ compatible are available as well. For example, there can be a To use one or more CUDA packages in an expression, give the expression a `cudaPackages` parameter, and in case CUDA is optional ```nix -{ config -, cudaSupport ? config.cudaSupport -, cudaPackages ? { } -, ... -}: {} +{ + config, + cudaSupport ? config.cudaSupport, + cudaPackages ? { }, + ... +}: +{ } ``` When using `callPackage`, you can choose to pass in a different variant, e.g. @@ -32,11 +34,15 @@ package set to make it the default. This guarantees you get a consistent package set. ```nix { - mypkg = let - cudaPackages = cudaPackages_11_5.overrideScope (final: prev: { - cudnn = prev.cudnn_8_3; - }); - in callPackage { inherit cudaPackages; }; + mypkg = + let + cudaPackages = cudaPackages_11_5.overrideScope ( + final: prev: { + cudnn = prev.cudnn_8_3; + } + ); + in + callPackage { inherit cudaPackages; }; } ``` diff --git a/doc/languages-frameworks/cuelang.section.md b/doc/languages-frameworks/cuelang.section.md index 70329b15fd7d..bbef29ee78a8 100644 --- a/doc/languages-frameworks/cuelang.section.md +++ b/doc/languages-frameworks/cuelang.section.md @@ -27,13 +27,11 @@ Nixpkgs provides a `pkgs.writeCueValidator` helper, which will write a validatio Here is an example: ```nix -pkgs.writeCueValidator - (pkgs.writeText "schema.cue" '' - #Def1: { - field1: string - } - '') - { document = "#Def1"; } +pkgs.writeCueValidator (pkgs.writeText "schema.cue" '' + #Def1: { + field1: string + } +'') { document = "#Def1"; } ``` - The first parameter is the Cue schema file. @@ -43,19 +41,19 @@ pkgs.writeCueValidator Another example, given the following `validator.nix` : ```nix -{ pkgs ? import {} }: +{ + pkgs ? import { }, +}: let - genericValidator = version: - pkgs.writeCueValidator - (pkgs.writeText "schema.cue" '' + genericValidator = + version: + pkgs.writeCueValidator (pkgs.writeText "schema.cue" '' #Version1: { field1: string } #Version2: #Version1 & { field1: "unused" - }'' - ) - { document = "#Version${toString version}"; }; + }'') { document = "#Version${toString version}"; }; in { validateV1 = genericValidator 1; diff --git a/doc/languages-frameworks/dart.section.md b/doc/languages-frameworks/dart.section.md index dfb456ba1941..3855cca89987 100644 --- a/doc/languages-frameworks/dart.section.md +++ b/doc/languages-frameworks/dart.section.md @@ -30,7 +30,11 @@ The `dart` commands run can be overridden through `pubGetScript` and `dartCompil Dart supports multiple [outputs types](https://dart.dev/tools/dart-compile#types-of-output), you can choose between them using `dartOutputType` (defaults to `exe`). If you want to override the binaries path or the source path they come from, you can use `dartEntryPoints`. Outputs that require a runtime will automatically be wrapped with the relevant runtime (`dartaotruntime` for `aot-snapshot`, `dart run` for `jit-snapshot` and `kernel`, `node` for `js`), this can be overridden through `dartRuntimeCommand`. ```nix -{ lib, buildDartApplication, fetchFromGitHub }: +{ + lib, + buildDartApplication, + fetchFromGitHub, +}: buildDartApplication rec { pname = "dart-sass"; @@ -101,7 +105,7 @@ See the [Dart documentation](#ssec-dart-applications) for more details on requir `flutter` in Nixpkgs always points to `flutterPackages.stable`, which is the latest packaged version. To avoid unforeseen breakage during upgrade, packages in Nixpkgs should use a specific flutter version, such as `flutter319` and `flutter322`, instead of using `flutter` directly. ```nix -{ flutter322, fetchFromGitHub }: +{ flutter322, fetchFromGitHub }: flutter322.buildFlutterApplication { pname = "firmware-updater"; diff --git a/doc/languages-frameworks/dhall.section.md b/doc/languages-frameworks/dhall.section.md index 8d85c9f1daf7..469f1a4fe3d1 100644 --- a/doc/languages-frameworks/dhall.section.md +++ b/doc/languages-frameworks/dhall.section.md @@ -90,7 +90,7 @@ buildDhallPackage { let nixpkgs = builtins.fetchTarball { - url = "https://github.com/NixOS/nixpkgs/archive/94b2848559b12a8ed1fe433084686b2a81123c99.tar.gz"; + url = "https://github.com/NixOS/nixpkgs/archive/94b2848559b12a8ed1fe433084686b2a81123c99.tar.gz"; hash = "sha256-B4Q3c6IvTLg3Q92qYa8y+i4uTaphtFdjp+Ir3QQjdN0="; }; @@ -100,15 +100,17 @@ let overlay = self: super: { dhallPackages = super.dhallPackages.override (old: { - overrides = - self.lib.composeExtensions (old.overrides or (_: _: {})) dhallOverlay; + overrides = self.lib.composeExtensions (old.overrides or (_: _: { })) dhallOverlay; }); }; - pkgs = import nixpkgs { config = {}; overlays = [ overlay ]; }; + pkgs = import nixpkgs { + config = { }; + overlays = [ overlay ]; + }; in - pkgs +pkgs ``` … which we can then build using this command: @@ -190,8 +192,7 @@ Dhall overlay like this: { dhallOverrides = self: super: { # Enable source for all Dhall packages - buildDhallPackage = - args: super.buildDhallPackage (args // { source = true; }); + buildDhallPackage = args: super.buildDhallPackage (args // { source = true; }); true = self.callPackage ./true.nix { }; }; diff --git a/doc/languages-frameworks/dotnet.section.md b/doc/languages-frameworks/dotnet.section.md index 23e3be414573..ea3448542f5d 100644 --- a/doc/languages-frameworks/dotnet.section.md +++ b/doc/languages-frameworks/dotnet.section.md @@ -6,7 +6,7 @@ For local development, it's recommended to use nix-shell to create a dotnet envi ```nix # shell.nix -with import {}; +with import { }; mkShell { name = "dotnet-env"; @@ -21,15 +21,18 @@ mkShell { It's very likely that more than one sdk will be needed on a given project. Dotnet provides several different frameworks (E.g dotnetcore, aspnetcore, etc.) as well as many versions for a given framework. Normally, dotnet is able to fetch a framework and install it relative to the executable. However, this would mean writing to the nix store in nixpkgs, which is read-only. To support the many-sdk use case, one can compose an environment using `dotnetCorePackages.combinePackages`: ```nix -with import {}; +with import { }; mkShell { name = "dotnet-env"; packages = [ - (with dotnetCorePackages; combinePackages [ - sdk_8_0 - sdk_9_0 - ]) + ( + with dotnetCorePackages; + combinePackages [ + sdk_8_0 + sdk_9_0 + ] + ) ]; } ``` @@ -137,11 +140,19 @@ When packaging a new application, you need to fetch its dependencies. Create an Here is an example `default.nix`, using some of the previously discussed arguments: ```nix -{ lib, buildDotnetModule, dotnetCorePackages, ffmpeg }: +{ + lib, + buildDotnetModule, + dotnetCorePackages, + ffmpeg, +}: let - referencedProject = import ../../bar { /* ... */ }; -in buildDotnetModule rec { + referencedProject = import ../../bar { + # ... + }; +in +buildDotnetModule rec { pname = "someDotnetApplication"; version = "0.1"; @@ -156,7 +167,7 @@ in buildDotnetModule rec { dotnet-runtime = dotnetCorePackages.runtime_8_0; executables = [ "foo" ]; # This wraps "$out/lib/$pname/foo" to `$out/bin/foo`. - executables = []; # Don't install any executables. + executables = [ ]; # Don't install any executables. packNupkg = true; # This packs the project as "foo-0.1.nupkg" at `$out/share`. diff --git a/doc/languages-frameworks/emscripten.section.md b/doc/languages-frameworks/emscripten.section.md index d1ed62d0503f..ce0956c51b02 100644 --- a/doc/languages-frameworks/emscripten.section.md +++ b/doc/languages-frameworks/emscripten.section.md @@ -41,56 +41,58 @@ One advantage is that when `pkgs.zlib` is updated, it will automatically update (pkgs.zlib.override { stdenv = pkgs.emscriptenStdenv; }).overrideAttrs -(old: rec { - buildInputs = old.buildInputs ++ [ pkg-config ]; - # we need to reset this setting! - env = (old.env or { }) // { NIX_CFLAGS_COMPILE = ""; }; - configurePhase = '' - # FIXME: Some tests require writing at $HOME - HOME=$TMPDIR - runHook preConfigure + (old: rec { + buildInputs = old.buildInputs ++ [ pkg-config ]; + # we need to reset this setting! + env = (old.env or { }) // { + NIX_CFLAGS_COMPILE = ""; + }; + configurePhase = '' + # FIXME: Some tests require writing at $HOME + HOME=$TMPDIR + runHook preConfigure - #export EMCC_DEBUG=2 - emconfigure ./configure --prefix=$out --shared + #export EMCC_DEBUG=2 + emconfigure ./configure --prefix=$out --shared - runHook postConfigure - ''; - dontStrip = true; - outputs = [ "out" ]; - buildPhase = '' - emmake make - ''; - installPhase = '' - emmake make install - ''; - checkPhase = '' - echo "================= testing zlib using node =================" + runHook postConfigure + ''; + dontStrip = true; + outputs = [ "out" ]; + buildPhase = '' + emmake make + ''; + installPhase = '' + emmake make install + ''; + checkPhase = '' + echo "================= testing zlib using node =================" - echo "Compiling a custom test" - set -x - emcc -O2 -s EMULATE_FUNCTION_POINTER_CASTS=1 test/example.c -DZ_SOLO \ - libz.so.${old.version} -I . -o example.js + echo "Compiling a custom test" + set -x + emcc -O2 -s EMULATE_FUNCTION_POINTER_CASTS=1 test/example.c -DZ_SOLO \ + libz.so.${old.version} -I . -o example.js - echo "Using node to execute the test" - ${pkgs.nodejs}/bin/node ./example.js + echo "Using node to execute the test" + ${pkgs.nodejs}/bin/node ./example.js - set +x - if [ $? -ne 0 ]; then - echo "test failed for some reason" - exit 1; - else - echo "it seems to work! very good." - fi - echo "================= /testing zlib using node =================" - ''; + set +x + if [ $? -ne 0 ]; then + echo "test failed for some reason" + exit 1; + else + echo "it seems to work! very good." + fi + echo "================= /testing zlib using node =================" + ''; - postPatch = pkgs.lib.optionalString pkgs.stdenv.hostPlatform.isDarwin '' - substituteInPlace configure \ - --replace-fail '/usr/bin/libtool' 'ar' \ - --replace-fail 'AR="libtool"' 'AR="ar"' \ - --replace-fail 'ARFLAGS="-o"' 'ARFLAGS="-r"' - ''; -}) + postPatch = pkgs.lib.optionalString pkgs.stdenv.hostPlatform.isDarwin '' + substituteInPlace configure \ + --replace-fail '/usr/bin/libtool' 'ar' \ + --replace-fail 'AR="libtool"' 'AR="ar"' \ + --replace-fail 'ARFLAGS="-o"' 'ARFLAGS="-r"' + ''; + }) ``` :::{.example #usage-2-pkgs.buildemscriptenpackage} @@ -103,8 +105,21 @@ This `xmlmirror` example features an Emscripten package that is defined complete pkgs.buildEmscriptenPackage rec { name = "xmlmirror"; - buildInputs = [ pkg-config autoconf automake libtool gnumake libxml2 nodejs openjdk json_c ]; - nativeBuildInputs = [ pkg-config zlib ]; + buildInputs = [ + pkg-config + autoconf + automake + libtool + gnumake + libxml2 + nodejs + openjdk + json_c + ]; + nativeBuildInputs = [ + pkg-config + zlib + ]; src = pkgs.fetchgit { url = "https://gitlab.com/odfplugfest/xmlmirror.git"; @@ -129,7 +144,10 @@ pkgs.buildEmscriptenPackage rec { make -f Makefile.emEnv ''; - outputs = [ "out" "doc" ]; + outputs = [ + "out" + "doc" + ]; installPhase = '' mkdir -p $out/share diff --git a/doc/languages-frameworks/factor.section.md b/doc/languages-frameworks/factor.section.md index 62db50e1ff6a..0d67eede4d34 100644 --- a/doc/languages-frameworks/factor.section.md +++ b/doc/languages-frameworks/factor.section.md @@ -125,7 +125,7 @@ factorPackages.buildFactorApplication (finalAttrs: { version = "1.0"; src = fetchurl { - url = "https://some-forge.org/foo-${finalAttrs.version}.tar.gz" + url = "https://some-forge.org/foo-${finalAttrs.version}.tar.gz"; }; }) ``` diff --git a/doc/languages-frameworks/gnome.section.md b/doc/languages-frameworks/gnome.section.md index 8374d55ac2f7..03b030fb7be5 100644 --- a/doc/languages-frameworks/gnome.section.md +++ b/doc/languages-frameworks/gnome.section.md @@ -96,7 +96,12 @@ Given the requirements above, the package expression would become messy quickly: --prefix XDG_DATA_DIRS : "$out/share/gsettings-schemas/${name}" \ --prefix XDG_DATA_DIRS : "${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}" \ --prefix XDG_DATA_DIRS : "${hicolor-icon-theme}/share" \ - --prefix GI_TYPELIB_PATH : "${lib.makeSearchPath "lib/girepository-1.0" [ pango json-glib ]}" + --prefix GI_TYPELIB_PATH : "${ + lib.makeSearchPath "lib/girepository-1.0" [ + pango + json-glib + ] + }" done ''; } diff --git a/doc/languages-frameworks/gradle.section.md b/doc/languages-frameworks/gradle.section.md index 762c8003a7a7..3d648ec0ae0b 100644 --- a/doc/languages-frameworks/gradle.section.md +++ b/doc/languages-frameworks/gradle.section.md @@ -21,7 +21,10 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-ciKotTHSEcITfQYKFZ6sY2LZnXGChBJy0+eno8B3YHY="; }; - nativeBuildInputs = [ gradle makeWrapper ]; + nativeBuildInputs = [ + gradle + makeWrapper + ]; # if the package has dependencies, mitmCache must be set mitmCache = gradle.fetchDeps { @@ -72,11 +75,12 @@ The first is to add the derivation arguments required for getting the package. Using the pdftk example above: ```nix -{ lib -, stdenv -, gradle -# ... -, pdftk +{ + lib, + stdenv, + gradle, + # ... + pdftk, }: stdenv.mkDerivation (finalAttrs: { diff --git a/doc/languages-frameworks/hare.section.md b/doc/languages-frameworks/hare.section.md index 0ae8abeba45c..7dfa42311480 100644 --- a/doc/languages-frameworks/hare.section.md +++ b/doc/languages-frameworks/hare.section.md @@ -25,7 +25,8 @@ The following attributes are accepted by `hareHook`: hareHook, lib, stdenv, -}: stdenv.mkDerivation { +}: +stdenv.mkDerivation { pname = ""; version = ""; src = ""; diff --git a/doc/languages-frameworks/haskell.section.md b/doc/languages-frameworks/haskell.section.md index 35682ff7cd7b..3cc16936f3c4 100644 --- a/doc/languages-frameworks/haskell.section.md +++ b/doc/languages-frameworks/haskell.section.md @@ -487,7 +487,7 @@ so: ```nix let - pkgs = import {}; + pkgs = import { }; inherit (pkgs) haskell; inherit (haskell.lib.compose) overrideCabal; @@ -511,7 +511,7 @@ let previousIntermediates = turtle-full-build-with-incremental-output.intermediates; }) turtle; in - turtle-incremental-build +turtle-incremental-build ``` ## Development environments {#haskell-development-environments} @@ -590,7 +590,9 @@ that: ```nix # Retrieve nixpkgs impurely from NIX_PATH for now, you can pin it instead, of course. -{ pkgs ? import {} }: +{ + pkgs ? import { }, +}: # use the nixpkgs default haskell package set pkgs.haskellPackages.callPackage ./my-project.nix { } @@ -660,7 +662,9 @@ Say our example above depends on `distribution-nixpkgs` and we have a project file set up for both, we can add the following `shell.nix` expression: ```nix -{ pkgs ? import {} }: +{ + pkgs ? import { }, +}: pkgs.haskellPackages.shellFor { packages = hpkgs: [ @@ -709,7 +713,12 @@ linked to work reliably. You can override the list of supported GHC versions with e.g. ```nix -pkgs.haskell-language-server.override { supportedGhcVersions = [ "90" "94" ]; } +pkgs.haskell-language-server.override { + supportedGhcVersions = [ + "90" + "94" + ]; +} ``` Where all strings `version` are allowed such that `haskell.packages.ghc${version}` is an existing package set. @@ -892,11 +901,9 @@ for this to work. derivation: ```nix - pkgs.haskell.lib.overrideCabal - (pkgs.haskell.lib.justStaticExecutables my-haskell-package) - (drv: { - disallowGhcReference = false; - }) + pkgs.haskell.lib.overrideCabal (pkgs.haskell.lib.justStaticExecutables my-haskell-package) (drv: { + disallowGhcReference = false; + }) ``` Then use `strings` to determine which libraries are responsible: @@ -912,14 +919,12 @@ for this to work. Finally, use `remove-references-to` to delete those store paths from the produced output: ```nix - pkgs.haskell.lib.overrideCabal - (pkgs.haskell.lib.justStaticExecutables my-haskell-package) - (drv: { - postInstall = '' - ${drv.postInstall or ""} - remove-references-to -t ${pkgs.haskellPackages.hs-opentelemetry-sdk} - ''; - }) + pkgs.haskell.lib.overrideCabal (pkgs.haskell.lib.justStaticExecutables my-haskell-package) (drv: { + postInstall = '' + ${drv.postInstall or ""} + remove-references-to -t ${pkgs.haskellPackages.hs-opentelemetry-sdk} + ''; + }) ``` [164630]: https://github.com/NixOS/nixpkgs/issues/164630 @@ -1128,12 +1133,20 @@ Haskell packages using [import from derivation][import-from-derivation]. ```nix # cabal get mtl-2.2.1 && cd mtl-2.2.1 && cabal2nix . -{ mkDerivation, base, lib, transformers }: +{ + mkDerivation, + base, + lib, + transformers, +}: mkDerivation { pname = "mtl"; version = "2.2.1"; src = ./.; - libraryHaskellDepends = [ base transformers ]; + libraryHaskellDepends = [ + base + transformers + ]; homepage = "http://github.com/ekmett/mtl"; description = "Monad classes, using functional dependencies"; license = lib.licenses.bsd3; @@ -1280,60 +1293,69 @@ in # recommended to only use such an overlay if you are enabling profiling on a # platform that doesn't by default, because compiling GHC from scratch is # quite expensive. - (final: prev: - let - inherit (final) lib; - in + ( + final: prev: + let + inherit (final) lib; + in - { - haskell = prev.haskell // { - compiler = prev.haskell.compiler // { - ${ghcName} = prev.haskell.compiler.${ghcName}.override { - # Unfortunately, the GHC setting is named differently for historical reasons - enableProfiledLibs = enableProfiling; - }; - }; - }; - }) - - (final: prev: - let - inherit (final) lib; - haskellLib = final.haskell.lib.compose; - in - - { - haskell = prev.haskell // { - packages = prev.haskell.packages // { - ${ghcName} = prev.haskell.packages.${ghcName}.override { - overrides = hfinal: hprev: { - mkDerivation = args: hprev.mkDerivation (args // { - # Since we are forcing our ideas upon mkDerivation, this change will - # affect every package in the package set. - enableLibraryProfiling = enableProfiling; - - # To actually use profiling on an executable, executable profiling - # needs to be enabled for the executable you want to profile. You - # can either do this globally or… - enableExecutableProfiling = enableProfiling; - }); - - # …only for the package that contains an executable you want to profile. - # That saves on unnecessary rebuilds for packages that you only depend - # on for their library, but also contain executables (e.g. pandoc). - my-executable = haskellLib.enableExecutableProfiling hprev.my-executable; - - # If you are disabling profiling to save on build time, but want to - # retain the ability to substitute from the binary cache. Drop the - # override for mkDerivation above and instead have an override like - # this for the specific packages you are building locally and want - # to make cheaper to build. - my-library = haskellLib.disableLibraryProfiling hprev.my-library; + { + haskell = prev.haskell // { + compiler = prev.haskell.compiler // { + ${ghcName} = prev.haskell.compiler.${ghcName}.override { + # Unfortunately, the GHC setting is named differently for historical reasons + enableProfiledLibs = enableProfiling; }; }; }; - }; - }) + } + ) + + ( + final: prev: + let + inherit (final) lib; + haskellLib = final.haskell.lib.compose; + in + + { + haskell = prev.haskell // { + packages = prev.haskell.packages // { + ${ghcName} = prev.haskell.packages.${ghcName}.override { + overrides = hfinal: hprev: { + mkDerivation = + args: + hprev.mkDerivation ( + args + // { + # Since we are forcing our ideas upon mkDerivation, this change will + # affect every package in the package set. + enableLibraryProfiling = enableProfiling; + + # To actually use profiling on an executable, executable profiling + # needs to be enabled for the executable you want to profile. You + # can either do this globally or… + enableExecutableProfiling = enableProfiling; + } + ); + + # …only for the package that contains an executable you want to profile. + # That saves on unnecessary rebuilds for packages that you only depend + # on for their library, but also contain executables (e.g. pandoc). + my-executable = haskellLib.enableExecutableProfiling hprev.my-executable; + + # If you are disabling profiling to save on build time, but want to + # retain the ability to substitute from the binary cache. Drop the + # override for mkDerivation above and instead have an override like + # this for the specific packages you are building locally and want + # to make cheaper to build. + my-library = haskellLib.disableLibraryProfiling hprev.my-library; + }; + }; + }; + }; + } + ) ] ``` diff --git a/doc/languages-frameworks/hy.section.md b/doc/languages-frameworks/hy.section.md index 49309e4819f5..9eaa7a39fa1e 100644 --- a/doc/languages-frameworks/hy.section.md +++ b/doc/languages-frameworks/hy.section.md @@ -22,10 +22,16 @@ $ nix-shell -p "hy.withPackages (ps: with ps; [ numpy matplotlib ])" Or if you want to extend your `configuration.nix`: ```nix -{ # ... +{ + # ... environment.systemPackages = with pkgs; [ - (hy.withPackages (py-packages: with py-packages; [ numpy matplotlib ])) + (hy.withPackages ( + py-packages: with py-packages; [ + numpy + matplotlib + ] + )) ]; } ``` diff --git a/doc/languages-frameworks/idris.section.md b/doc/languages-frameworks/idris.section.md index 0fa828825749..692a6b64d69d 100644 --- a/doc/languages-frameworks/idris.section.md +++ b/doc/languages-frameworks/idris.section.md @@ -12,7 +12,12 @@ This however only provides the `prelude` and `base` libraries. To install idris ```nix self: super: { - myIdris = with self.idrisPackages; with-packages [ contrib pruviloj ]; + myIdris = + with self.idrisPackages; + with-packages [ + contrib + pruviloj + ]; } ``` @@ -68,13 +73,14 @@ prelude As an example of how a Nix expression for an Idris package can be created, here is the one for `idrisPackages.yaml`: ```nix -{ lib -, build-idris-package -, fetchFromGitHub -, contrib -, lightyear +{ + lib, + build-idris-package, + fetchFromGitHub, + contrib, + lightyear, }: -build-idris-package { +build-idris-package { name = "yaml"; version = "2018-01-25"; @@ -84,7 +90,10 @@ build-idris-package { # different from its package name here. ipkgName = "Yaml"; # Idris dependencies to provide for the build - idrisDeps = [ contrib lightyear ]; + idrisDeps = [ + contrib + lightyear + ]; src = fetchFromGitHub { owner = "Heather"; @@ -111,10 +120,10 @@ $ nix-build -E '(import {}).idrisPackages.callPackage ./yaml.nix {}' Or it's possible to use ```nix -with import {}; +with import { }; { - yaml = idrisPackages.callPackage ./yaml.nix {}; + yaml = idrisPackages.callPackage ./yaml.nix { }; } ``` @@ -134,7 +143,11 @@ For example you could set ```nix build-idris-package { - idrisBuildOptions = [ "--log" "1" "--verbose" ]; + idrisBuildOptions = [ + "--log" + "1" + "--verbose" + ]; # ... } diff --git a/doc/languages-frameworks/idris2.section.md b/doc/languages-frameworks/idris2.section.md index 3ea9b4f988f7..6350f44c8c74 100644 --- a/doc/languages-frameworks/idris2.section.md +++ b/doc/languages-frameworks/idris2.section.md @@ -9,39 +9,50 @@ Importantly, `buildIdris` does not create a single derivation but rather an attr A simple example of a fully packaged library would be the [`LSP-lib`](https://github.com/idris-community/LSP-lib) found in the `idris-community` GitHub organization. ```nix { fetchFromGitHub, idris2Packages }: -let lspLibPkg = idris2Packages.buildIdris { - ipkgName = "lsp-lib"; - src = fetchFromGitHub { - owner = "idris-community"; - repo = "LSP-lib"; - rev = "main"; - hash = "sha256-EvSyMCVyiy9jDZMkXQmtwwMoLaem1GsKVFqSGNNHHmY="; +let + lspLibPkg = idris2Packages.buildIdris { + ipkgName = "lsp-lib"; + src = fetchFromGitHub { + owner = "idris-community"; + repo = "LSP-lib"; + rev = "main"; + hash = "sha256-EvSyMCVyiy9jDZMkXQmtwwMoLaem1GsKVFqSGNNHHmY="; + }; + idrisLibraries = [ ]; }; - idrisLibraries = [ ]; -}; -in lspLibPkg.library { withSource = true; } +in +lspLibPkg.library { withSource = true; } ``` The above results in a derivation with the installed library results (with sourcecode). A slightly more involved example of a fully packaged executable would be the [`idris2-lsp`](https://github.com/idris-community/idris2-lsp) which is an Idris2 language server that uses the `LSP-lib` found above. ```nix -{ callPackage, fetchFromGitHub, idris2Packages }: +{ + callPackage, + fetchFromGitHub, + idris2Packages, +}: # Assuming the previous example lives in `lsp-lib.nix`: -let lspLib = callPackage ./lsp-lib.nix { }; - inherit (idris2Packages) idris2Api; - lspPkg = idris2Packages.buildIdris { - ipkgName = "idris2-lsp"; - src = fetchFromGitHub { - owner = "idris-community"; - repo = "idris2-lsp"; - rev = "main"; - hash = "sha256-vQTzEltkx7uelDtXOHc6QRWZ4cSlhhm5ziOqWA+aujk="; - }; - idrisLibraries = [idris2Api lspLib]; +let + lspLib = callPackage ./lsp-lib.nix { }; + inherit (idris2Packages) idris2Api; + lspPkg = idris2Packages.buildIdris { + ipkgName = "idris2-lsp"; + src = fetchFromGitHub { + owner = "idris-community"; + repo = "idris2-lsp"; + rev = "main"; + hash = "sha256-vQTzEltkx7uelDtXOHc6QRWZ4cSlhhm5ziOqWA+aujk="; }; -in lspPkg.executable + idrisLibraries = [ + idris2Api + lspLib + ]; + }; +in +lspPkg.executable ``` The above uses the default value of `withSource = false` for the `idris2Api` but could be modified to include that library's source by passing `(idris2Api { withSource = true; })` to `idrisLibraries` instead. `idris2Api` in the above derivation comes built in with `idris2Packages`. This library exposes many of the otherwise internal APIs of the Idris2 compiler. diff --git a/doc/languages-frameworks/ios.section.md b/doc/languages-frameworks/ios.section.md index eb8e2ca55326..3823b097d7a2 100644 --- a/doc/languages-frameworks/ios.section.md +++ b/doc/languages-frameworks/ios.section.md @@ -29,7 +29,7 @@ Xcode. ```nix let - pkgs = import {}; + pkgs = import { }; xcodeenv = import ./xcodeenv { inherit (pkgs) stdenv; @@ -63,7 +63,7 @@ executing the `xcodeenv.buildApp {}` function: ```nix let - pkgs = import {}; + pkgs = import { }; xcodeenv = import ./xcodeenv { inherit (pkgs) stdenv; @@ -159,7 +159,7 @@ instances: ```nix let - pkgs = import {}; + pkgs = import { }; xcodeenv = import ./xcodeenv { inherit (pkgs) stdenv; @@ -193,7 +193,7 @@ app in the requested simulator instance: ```nix let - pkgs = import {}; + pkgs = import { }; xcodeenv = import ./xcodeenv { inherit (pkgs) stdenv; diff --git a/doc/languages-frameworks/java.section.md b/doc/languages-frameworks/java.section.md index 5208a6388a32..05203c378ae9 100644 --- a/doc/languages-frameworks/java.section.md +++ b/doc/languages-frameworks/java.section.md @@ -7,7 +7,9 @@ stdenv.mkDerivation { pname = "..."; version = "..."; - src = fetchurl { /* ... */ }; + src = fetchurl { + # ... + }; nativeBuildInputs = [ ant @@ -95,7 +97,7 @@ let something = (pkgs.something.override { jre = my_jre; }); other = (pkgs.other.override { jre = my_jre; }); in - <...> +<...> ``` You can also specify what JDK your JRE should be based on, for example @@ -122,7 +124,10 @@ OpenJDK. For instance, to use the GNU Java Compiler: ```nix { - nativeBuildInputs = [ gcj ant ]; + nativeBuildInputs = [ + gcj + ant + ]; } ``` diff --git a/doc/languages-frameworks/javascript.section.md b/doc/languages-frameworks/javascript.section.md index 9acfd4181108..440e8c62adaa 100644 --- a/doc/languages-frameworks/javascript.section.md +++ b/doc/languages-frameworks/javascript.section.md @@ -117,12 +117,19 @@ After you have identified the correct system, you need to override your package For example, `dat` requires `node-gyp-build`, so we override its expression in [pkgs/development/node-packages/overrides.nix](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/node-packages/overrides.nix): ```nix - { - dat = prev.dat.override (oldAttrs: { - buildInputs = [ final.node-gyp-build pkgs.libtool pkgs.autoconf pkgs.automake ]; - meta = oldAttrs.meta // { broken = since "12"; }; - }); - } +{ + dat = prev.dat.override (oldAttrs: { + buildInputs = [ + final.node-gyp-build + pkgs.libtool + pkgs.autoconf + pkgs.automake + ]; + meta = oldAttrs.meta // { + broken = since "12"; + }; + }); +} ``` ### Adding and Updating Javascript packages in nixpkgs {#javascript-adding-or-updating-packages} @@ -185,7 +192,11 @@ It works by utilizing npm's cache functionality -- creating a reproducible cache Here's an example: ```nix -{ lib, buildNpmPackage, fetchFromGitHub }: +{ + lib, + buildNpmPackage, + fetchFromGitHub, +}: buildNpmPackage rec { pname = "flood"; @@ -323,7 +334,9 @@ buildNpmPackage { npmRoot = ./.; fetcherOpts = { # Pass 'curlOptsList' to 'pkgs.fetchurl' while fetching 'axios' - { "node_modules/axios" = { curlOptsList = [ "--verbose" ]; }; } + "node_modules/axios" = { + curlOptsList = [ "--verbose" ]; + }; }; }; @@ -403,14 +416,16 @@ When packaging an application that includes a `pnpm-lock.yaml`, you need to fetc stdenv, nodejs, # This is pinned as { pnpm = pnpm_9; } - pnpm + pnpm, }: stdenv.mkDerivation (finalAttrs: { pname = "foo"; version = "0-unstable-1980-01-01"; - src = ...; + src = { + #... + }; nativeBuildInputs = [ nodejs @@ -439,7 +454,9 @@ stdenv.mkDerivation (finalAttrs: { pname = "foo"; version = "0-unstable-1980-01-01"; - src = ...; + src = { + # ... + }; pnpmInstallFlags = [ "--shamefully-hoist" ]; @@ -466,14 +483,16 @@ Assuming the following directory structure, we can define `sourceRoot` and `pnpm ``` ```nix - ... +{ + # ... pnpmDeps = pnpm.fetchDeps { - ... + # ... sourceRoot = "${finalAttrs.src.name}/frontend"; }; # by default the working directory is the extracted source pnpmRoot = "frontend"; +} ``` #### PNPM Workspaces {#javascript-pnpm-workspaces} @@ -484,11 +503,13 @@ which will make PNPM only install dependencies for those workspace packages. For example: ```nix -... -pnpmWorkspaces = [ "@astrojs/language-server" ]; -pnpmDeps = pnpm.fetchDeps { - inherit (finalAttrs) pnpmWorkspaces; - ... +{ + # ... + pnpmWorkspaces = [ "@astrojs/language-server" ]; + pnpmDeps = pnpm.fetchDeps { + inherit (finalAttrs) pnpmWorkspaces; + #... + }; } ``` @@ -498,13 +519,15 @@ Note that you do not need to set `sourceRoot` to make this work. Usually in such cases, you'd want to use `pnpm --filter= build` to build your project, as `npmHooks.npmBuildHook` probably won't work. A `buildPhase` based on the following example will probably fit most workspace projects: ```nix -buildPhase = '' - runHook preBuild +{ + buildPhase = '' + runHook preBuild - pnpm --filter=@astrojs/language-server build + pnpm --filter=@astrojs/language-server build - runHook postBuild -''; + runHook postBuild + ''; +} ``` #### Additional PNPM Commands and settings {#javascript-pnpm-extraCommands} @@ -513,13 +536,15 @@ If you require setting an additional PNPM configuration setting (such as `dedupe set `prePnpmInstall` to the right commands to run. For example: ```nix -prePnpmInstall = '' - pnpm config set dedupe-peer-dependants false -''; -pnpmDeps = pnpm.fetchDeps { - inherit (finalAttrs) prePnpmInstall; - ... -}; +{ + prePnpmInstall = '' + pnpm config set dedupe-peer-dependants false + ''; + pnpmDeps = pnpm.fetchDeps { + inherit (finalAttrs) prePnpmInstall; + # ... + }; +} ``` In this example, `prePnpmInstall` will be run by both `pnpm.configHook` and by the `pnpm.fetchDeps` builder. @@ -678,7 +703,11 @@ To fix this we will specify different versions of build inputs to use, as well a mkYarnPackage rec { pkgConfig = { node-sass = { - buildInputs = with final;[ python libsass pkg-config ]; + buildInputs = with final; [ + python + libsass + pkg-config + ]; postInstall = '' LIBSASS_EXT=auto yarn --offline run build rm build/config.gypi diff --git a/doc/languages-frameworks/julia.section.md b/doc/languages-frameworks/julia.section.md index 4e7d9d365a39..c0b7fd8d6618 100644 --- a/doc/languages-frameworks/julia.section.md +++ b/doc/languages-frameworks/julia.section.md @@ -19,7 +19,7 @@ This function accepts a list of strings representing Julia package names. For example, you can build a Julia environment with the `Plots` package as follows. ```nix -julia.withPackages ["Plots"] +julia.withPackages [ "Plots" ] ``` Arguments can be passed using `.override`. @@ -28,7 +28,8 @@ For example: ```nix (julia.withPackages.override { precompile = false; # Turn off precompilation -}) ["Plots"] +}) + [ "Plots" ] ``` Here's a nice way to run a Julia environment with a shell one-liner: diff --git a/doc/languages-frameworks/lisp.section.md b/doc/languages-frameworks/lisp.section.md index 73f20436c76f..6682137121ee 100644 --- a/doc/languages-frameworks/lisp.section.md +++ b/doc/languages-frameworks/lisp.section.md @@ -48,7 +48,8 @@ Also one can create a `pkgs.mkShell` environment in `shell.nix`/`flake.nix`: ```nix let sbcl' = sbcl.withPackages (ps: [ ps.alexandria ]); -in mkShell { +in +mkShell { packages = [ sbcl' ]; } ``` @@ -188,10 +189,13 @@ let hash = "sha256-1Hzxt65dZvgOFIljjjlSGgKYkj+YBLwJCACi5DZsKmQ="; }; }; - sbcl' = sbcl.withOverrides (self: super: { - inherit alexandria; - }); -in sbcl'.pkgs.alexandria + sbcl' = sbcl.withOverrides ( + self: super: { + inherit alexandria; + } + ); +in +sbcl'.pkgs.alexandria ``` ## Overriding package attributes {#lisp-overriding-package-attributes} @@ -296,6 +300,9 @@ This example wraps CLISP: wrapLisp { pkg = clisp; faslExt = "fas"; - flags = ["-E" "UTF8"]; + flags = [ + "-E" + "UTF8" + ]; } ``` diff --git a/doc/languages-frameworks/lua.section.md b/doc/languages-frameworks/lua.section.md index 87bf7ce885bc..84af997df860 100644 --- a/doc/languages-frameworks/lua.section.md +++ b/doc/languages-frameworks/lua.section.md @@ -27,9 +27,14 @@ Note that nixpkgs patches the non-luajit interpreters to avoid referring to Create a file, e.g. `build.nix`, with the following expression ```nix -with import {}; +with import { }; -lua5_2.withPackages (ps: with ps; [ busted luafilesystem ]) +lua5_2.withPackages ( + ps: with ps; [ + busted + luafilesystem + ] +) ``` and install it in your profile with @@ -46,11 +51,18 @@ If you prefer to, you could also add the environment as a package override to th using `config.nix`, ```nix -{ # ... +{ + # ... - packageOverrides = pkgs: with pkgs; { - myLuaEnv = lua5_2.withPackages (ps: with ps; [ busted luafilesystem ]); - }; + packageOverrides = + pkgs: with pkgs; { + myLuaEnv = lua5_2.withPackages ( + ps: with ps; [ + busted + luafilesystem + ] + ); + }; } ``` @@ -67,10 +79,16 @@ the `nixpkgs` channel was used. For the sake of completeness, here's another example how to install the environment system-wide. ```nix -{ # ... +{ + # ... environment.systemPackages = with pkgs; [ - (lua.withPackages(ps: with ps; [ busted luafilesystem ])) + (lua.withPackages ( + ps: with ps; [ + busted + luafilesystem + ] + )) ]; } ``` @@ -80,13 +98,12 @@ For the sake of completeness, here's another example how to install the environm Use the following overlay template: ```nix -final: prev: -{ +final: prev: { lua = prev.lua.override { packageOverrides = luaself: luaprev: { - luarocks-nix = luaprev.luarocks-nix.overrideAttrs(oa: { + luarocks-nix = luaprev.luarocks-nix.overrideAttrs (oa: { pname = "luarocks-nix"; src = /home/my_luarocks/repository; }); @@ -159,7 +176,11 @@ within a `toLuaModule` call, for instance ```nix { - mynewlib = toLuaModule ( stdenv.mkDerivation { /* ... */ }); + mynewlib = toLuaModule ( + stdenv.mkDerivation { + # ... + } + ); } ``` @@ -194,16 +215,23 @@ The following is an example: version = "34.0.4-1"; src = fetchurl { - url = "https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/master/luaposix-34.0.4-1.src.rock"; + url = "https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/master/luaposix-34.0.4-1.src.rock"; hash = "sha256-4mLJG8n4m6y4Fqd0meUDfsOb9RHSR0qa/KD5KCwrNXs="; }; disabled = (luaOlder "5.1") || (luaAtLeast "5.4"); - propagatedBuildInputs = [ bit32 lua std_normalize ]; + propagatedBuildInputs = [ + bit32 + lua + std_normalize + ]; meta = { homepage = "https://github.com/luaposix/luaposix/"; description = "Lua bindings for POSIX"; - maintainers = with lib.maintainers; [ vyp lblasc ]; + maintainers = with lib.maintainers; [ + vyp + lblasc + ]; license.fullName = "MIT/X11"; }; }; @@ -242,14 +270,14 @@ The `lua.withPackages` takes a function as an argument that is passed the set of Using the `withPackages` function, the previous example for the luafilesystem environment can be written like this: ```nix -lua.withPackages (ps: [ps.luafilesystem]) +lua.withPackages (ps: [ ps.luafilesystem ]) ``` `withPackages` passes the correct package set for the specific interpreter version as an argument to the function. In the above example, `ps` equals `luaPackages`. But you can also easily switch to using `lua5_1`: ```nix -lua5_1.withPackages (ps: [ps.lua]) +lua5_1.withPackages (ps: [ ps.lua ]) ``` Now, `ps` is set to `lua5_1.pkgs`, matching the version of the interpreter. diff --git a/doc/languages-frameworks/maven.section.md b/doc/languages-frameworks/maven.section.md index 88fe4d0c9224..1689ad1580a7 100644 --- a/doc/languages-frameworks/maven.section.md +++ b/doc/languages-frameworks/maven.section.md @@ -9,7 +9,13 @@ The following provides a list of common patterns with how to package a Maven pro Consider the following package: ```nix -{ lib, fetchFromGitHub, jre, makeWrapper, maven }: +{ + lib, + fetchFromGitHub, + jre, + makeWrapper, + maven, +}: maven.buildMavenPackage rec { pname = "jd-cli"; @@ -91,7 +97,7 @@ jd-cli.overrideMavenAttrs (old: rec { # old mvnHash of 1.2.0 maven dependencies mvnHash = "sha256-N9XC1pg6Y4sUiBWIQUf16QSXCuiAPpXEHGlgApviF4I="; -}); +}) ``` ::: @@ -129,7 +135,7 @@ maven.buildMavenPackage rec { "org.apache.maven.surefire:surefire-junit-platform:3.1.2" "org.junit.platform:junit-platform-launcher:1.10.0" ]; -}; +} ``` ::: @@ -246,7 +252,9 @@ This file is then given to the `buildMaven` function, and it returns 2 attribute Here is an [example](https://github.com/fzakaria/nixos-maven-example/blob/main/build-maven-repository.nix) of building the Maven repository ```nix -{ pkgs ? import { } }: +{ + pkgs ? import { }, +}: with pkgs; (buildMaven ./project-info.json).repo ``` @@ -283,7 +291,11 @@ Traditionally the Maven repository is at `~/.m2/repository`. We will override th ::: ```nix -{ lib, stdenv, maven }: +{ + lib, + stdenv, + maven, +}: stdenv.mkDerivation { name = "maven-repository"; buildInputs = [ maven ]; @@ -337,10 +349,16 @@ If your package uses _SNAPSHOT_ dependencies or _version ranges_; there is a str Regardless of which strategy is chosen above, the step to build the derivation is the same. ```nix -{ stdenv, maven, callPackage }: +{ + stdenv, + maven, + callPackage, +}: # pick a repository derivation, here we will use buildMaven -let repository = callPackage ./build-maven-repository.nix { }; -in stdenv.mkDerivation rec { +let + repository = callPackage ./build-maven-repository.nix { }; +in +stdenv.mkDerivation rec { pname = "maven-demo"; version = "1.0"; @@ -393,15 +411,21 @@ We will read the Maven repository and flatten it to a single list. This list wil We make sure to provide this classpath to the `makeWrapper`. ```nix -{ stdenv, maven, callPackage, makeWrapper, jre }: +{ + stdenv, + maven, + callPackage, + makeWrapper, + jre, +}: let repository = callPackage ./build-maven-repository.nix { }; -in stdenv.mkDerivation rec { +in +stdenv.mkDerivation rec { pname = "maven-demo"; version = "1.0"; - src = builtins.fetchTarball - "https://github.com/fzakaria/nixos-maven-example/archive/main.tar.gz"; + src = builtins.fetchTarball "https://github.com/fzakaria/nixos-maven-example/archive/main.tar.gz"; nativeBuildInputs = [ makeWrapper ]; buildInputs = [ maven ]; @@ -471,15 +495,22 @@ Main-Class: Main We will modify the derivation above to add a symlink to our repository so that it's accessible to our JAR during the `installPhase`. ```nix -{ stdenv, maven, callPackage, makeWrapper, jre }: +{ + stdenv, + maven, + callPackage, + makeWrapper, + jre, +}: # pick a repository derivation, here we will use buildMaven -let repository = callPackage ./build-maven-repository.nix { }; -in stdenv.mkDerivation rec { +let + repository = callPackage ./build-maven-repository.nix { }; +in +stdenv.mkDerivation rec { pname = "maven-demo"; version = "1.0"; - src = builtins.fetchTarball - "https://github.com/fzakaria/nixos-maven-example/archive/main.tar.gz"; + src = builtins.fetchTarball "https://github.com/fzakaria/nixos-maven-example/archive/main.tar.gz"; nativeBuildInputs = [ makeWrapper ]; buildInputs = [ maven ]; diff --git a/doc/languages-frameworks/neovim.section.md b/doc/languages-frameworks/neovim.section.md index 1c58170e3fe6..71bc52b541dc 100644 --- a/doc/languages-frameworks/neovim.section.md +++ b/doc/languages-frameworks/neovim.section.md @@ -91,8 +91,8 @@ wrapNeovimUnstable neovim-unwrapped { You can explore the configuration with`nix repl` to discover these options and override them. For instance: ```nix -neovim.overrideAttrs(oldAttrs: { - autowrapRuntimeDeps = false; +neovim.overrideAttrs (oldAttrs: { + autowrapRuntimeDeps = false; }) ``` @@ -116,9 +116,11 @@ top-level while luarocks installs them in various subfolders by default. For instance: ```nix -rtp-nvim = neovimUtils.buildNeovimPlugin { +{ + rtp-nvim = neovimUtils.buildNeovimPlugin { luaAttr = luaPackages.rtp-nvim; -}; + }; +} ``` To update these packages, you should use the lua updater rather than vim's. @@ -164,16 +166,19 @@ The check hook will fail the build if any modules cannot be loaded. This encoura To only check a specific module, add it manually to the plugin definition [overrides](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/overrides.nix). ```nix +{ gitsigns-nvim = super.gitsigns-nvim.overrideAttrs { dependencies = [ self.plenary-nvim ]; nvimRequireCheck = "gitsigns"; }; +} ``` Some plugins will have lua modules that require a user configuration to function properly or can contain optional lua modules that we dont want to test requiring. We can skip specific modules using `nvimSkipModules`. Similar to `nvimRequireCheck`, it accepts a list of strings. - `nvimSkipModules = [ MODULE1 MODULE2 ];` ```nix +{ asyncrun-vim = super.asyncrun-vim.overrideAttrs { nvimSkipModules = [ # vim plugin with optional toggleterm integration @@ -181,14 +186,17 @@ We can skip specific modules using `nvimSkipModules`. Similar to `nvimRequireChe "asyncrun.toggleterm2" ]; }; +} ``` In rare cases, we might not want to actually test loading lua modules for a plugin. In those cases, we can disable `neovimRequireCheck` with `doCheck = false;`. This can be manually added through plugin definition overrides in the [overrides.nix](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/overrides.nix). ```nix +{ vim-test = super.vim-test.overrideAttrs { # Vim plugin with a test lua file doCheck = false; }; +} ``` diff --git a/doc/languages-frameworks/nim.section.md b/doc/languages-frameworks/nim.section.md index f0196c9d116f..ef3ecbba7d74 100644 --- a/doc/languages-frameworks/nim.section.md +++ b/doc/languages-frameworks/nim.section.md @@ -7,7 +7,11 @@ Nim programs are built using a lockfile and either `buildNimPackage` or `buildNi The following example shows a Nim program that depends only on Nim libraries: ```nix -{ lib, buildNimPackage, fetchFromGitHub }: +{ + lib, + buildNimPackage, + fetchFromGitHub, +}: buildNimPackage (finalAttrs: { pname = "ttop"; @@ -91,7 +95,9 @@ The `buildNimPackage` and `buildNimSbom` functions generate flags and additional ```nix pkgs.nitter.overrideNimAttrs { # using a different source which has different dependencies from the standard package - src = pkgs.fetchFromGithub { /* … */ }; + src = pkgs.fetchFromGithub { + # … + }; # new lock file generated from the source lockFile = ./custom-lock.json; } @@ -104,21 +110,25 @@ The default overrides are maintained as the top-level `nimOverrides` attrset at For example, to propagate a dependency on SDL2 for lockfiles that select the Nim `sdl2` library, an overlay is added to the set in the `nim-overrides.nix` file: ```nix -{ lib -/* … */ -, SDL2 -/* … */ +{ + lib, + # … + SDL2, +# … }: { - /* … */ + # … sdl2 = lockAttrs: - { buildInputs ? [ ], ... }: + { + buildInputs ? [ ], + ... + }: { buildInputs = buildInputs ++ [ SDL2 ]; }; - /* … */ + # … } ``` @@ -132,22 +142,28 @@ The `nimOverrides` attrset makes it possible to modify overrides in a few differ Override a package internal to its definition: ```nix -{ lib, buildNimPackage, nimOverrides, libressl }: +{ + lib, + buildNimPackage, + nimOverrides, + libressl, +}: let buildNimPackage' = buildNimPackage.override { nimOverrides = nimOverrides.override { openssl = libressl; }; }; -in buildNimPackage' (finalAttrs: { +in +buildNimPackage' (finalAttrs: { pname = "foo"; # … }) - ``` Override a package externally: ```nix -{ pkgs }: { +{ pkgs }: +{ foo = pkgs.foo.override { buildNimPackage = pkgs.buildNimPackage.override { nimOverrides = pkgs.nimOverrides.override { openssl = libressl; }; diff --git a/doc/languages-frameworks/ocaml.section.md b/doc/languages-frameworks/ocaml.section.md index 7f2c2a63a00b..496583d40261 100644 --- a/doc/languages-frameworks/ocaml.section.md +++ b/doc/languages-frameworks/ocaml.section.md @@ -12,13 +12,18 @@ To open a shell able to build a typical OCaml project, put the dependencies in ` For example: ```nix let - pkgs = import {}; - # choose the ocaml version you want to use - ocamlPackages = pkgs.ocaml-ng.ocamlPackages_4_12; + pkgs = import { }; + # choose the ocaml version you want to use + ocamlPackages = pkgs.ocaml-ng.ocamlPackages_4_12; in pkgs.mkShell { # build tools - nativeBuildInputs = with ocamlPackages; [ ocaml findlib dune_2 ocaml-lsp ]; + nativeBuildInputs = with ocamlPackages; [ + ocaml + findlib + dune_2 + ocaml-lsp + ]; # dependencies buildInputs = with ocamlPackages; [ ocamlgraph ]; } @@ -58,7 +63,8 @@ Here is a simple package example. generates. ```nix -{ lib, +{ + lib, fetchFromGitHub, buildDunePackage, ocaml, @@ -66,7 +72,8 @@ Here is a simple package example. alcotest, result, bigstringaf, - ppx_let }: + ppx_let, +}: buildDunePackage rec { pname = "angstrom"; @@ -75,15 +82,21 @@ buildDunePackage rec { minimalOCamlVersion = "4.04"; src = fetchFromGitHub { - owner = "inhabitedtype"; - repo = pname; - rev = version; - hash = "sha256-MK8o+iPGANEhrrTc1Kz9LBilx2bDPQt7Pp5P2libucI="; + owner = "inhabitedtype"; + repo = pname; + rev = version; + hash = "sha256-MK8o+iPGANEhrrTc1Kz9LBilx2bDPQt7Pp5P2libucI="; }; - checkInputs = [ alcotest ppx_let ]; + checkInputs = [ + alcotest + ppx_let + ]; buildInputs = [ ocaml-syntax-shims ]; - propagatedBuildInputs = [ bigstringaf result ]; + propagatedBuildInputs = [ + bigstringaf + result + ]; doCheck = lib.versionAtLeast ocaml.version "4.05"; meta = { @@ -98,7 +111,11 @@ buildDunePackage rec { Here is a second example, this time using a source archive generated with `dune-release`. It is a good idea to use this archive when it is available as it will usually contain substituted variables such as a `%%VERSION%%` field. This library does not depend on any other OCaml library and no tests are run after building it. ```nix -{ lib, fetchurl, buildDunePackage }: +{ + lib, + fetchurl, + buildDunePackage, +}: buildDunePackage rec { pname = "wtf8"; diff --git a/doc/languages-frameworks/octave.section.md b/doc/languages-frameworks/octave.section.md index 4ad2cb0d5fbf..8bb75d73f62e 100644 --- a/doc/languages-frameworks/octave.section.md +++ b/doc/languages-frameworks/octave.section.md @@ -39,7 +39,9 @@ $ nix-shell -p 'octave.withPackages (ps: with ps; [ symbolic ])' This will also work in a `shell.nix` file. ```nix -{ pkgs ? import { }}: +{ + pkgs ? import { }, +}: pkgs.mkShell { nativeBuildInputs = with pkgs; [ diff --git a/doc/languages-frameworks/perl.section.md b/doc/languages-frameworks/perl.section.md index 843d46584cdd..3683ed515d0e 100644 --- a/doc/languages-frameworks/perl.section.md +++ b/doc/languages-frameworks/perl.section.md @@ -51,7 +51,10 @@ Note the use of `mirror://cpan/`, and the `pname` and `version` in the URL defin ```nix { foo = import ../path/to/foo.nix { - inherit stdenv fetchurl /* ... */; + inherit + stdenv + fetchurl # ... + ; inherit (perlPackages) ClassC3; }; } @@ -74,7 +77,11 @@ So what does `buildPerlPackage` do? It does the following: `buildPerlPackage` is built on top of `stdenv`, so everything can be customised in the usual way. For instance, the `BerkeleyDB` module has a `preConfigure` hook to generate a configuration file used by `Makefile.PL`: ```nix -{ buildPerlPackage, fetchurl, db }: +{ + buildPerlPackage, + fetchurl, + db, +}: buildPerlPackage rec { pname = "BerkeleyDB"; @@ -104,7 +111,10 @@ Dependencies on other Perl packages can be specified in the `buildInputs` and `p hash = "sha256-ASO9rV/FzJYZ0BH572Fxm2ZrFLMZLFATJng1NuU4FHc="; }; propagatedBuildInputs = [ - ClassC3 ClassInspector TestException MROCompat + ClassC3 + ClassInspector + TestException + MROCompat ]; }; } @@ -113,7 +123,13 @@ Dependencies on other Perl packages can be specified in the `buildInputs` and `p On Darwin, if a script has too many `-Idir` flags in its first line (its “shebang line”), it will not run. This can be worked around by calling the `shortenPerlShebang` function from the `postInstall` phase: ```nix -{ lib, stdenv, buildPerlPackage, fetchurl, shortenPerlShebang }: +{ + lib, + stdenv, + buildPerlPackage, + fetchurl, + shortenPerlShebang, +}: { ImageExifTool = buildPerlPackage { diff --git a/doc/languages-frameworks/php.section.md b/doc/languages-frameworks/php.section.md index 1bcb4ee727a5..688e17a725b5 100644 --- a/doc/languages-frameworks/php.section.md +++ b/doc/languages-frameworks/php.section.md @@ -45,24 +45,30 @@ extensions. For example, a PHP package with all default extensions and ImageMagick enabled: ```nix -php.withExtensions ({ enabled, all }: - enabled ++ [ all.imagick ]) +php.withExtensions ({ enabled, all }: enabled ++ [ all.imagick ]) ``` To exclude some, but not all, of the default extensions, you can filter the `enabled` list like this: ```nix -php.withExtensions ({ enabled, all }: - (lib.filter (e: e != php.extensions.opcache) enabled) - ++ [ all.imagick ]) +php.withExtensions ( + { enabled, all }: (lib.filter (e: e != php.extensions.opcache) enabled) ++ [ all.imagick ] +) ``` To build your list of extensions from the ground up, you can ignore `enabled`: ```nix -php.withExtensions ({ all, ... }: with all; [ imagick opcache ]) +php.withExtensions ( + { all, ... }: + with all; + [ + imagick + opcache + ] +) ``` `php.withExtensions` provides extensions by wrapping a minimal php @@ -82,7 +88,13 @@ and ImageMagick extensions enabled, and `memory_limit` set to `256M`: ```nix php.buildEnv { - extensions = { all, ... }: with all; [ imagick opcache ]; + extensions = + { all, ... }: + with all; + [ + imagick + opcache + ]; extraConfig = "memory_limit=256M"; } ``` @@ -94,8 +106,16 @@ follows: ```nix let - myPhp = php.withExtensions ({ all, ... }: with all; [ imagick opcache ]); -in { + myPhp = php.withExtensions ( + { all, ... }: + with all; + [ + imagick + opcache + ] + ); +in +{ services.phpfpm.pools."foo".phpPackage = myPhp; } ``` @@ -103,10 +123,17 @@ in { ```nix let myPhp = php.buildEnv { - extensions = { all, ... }: with all; [ imagick opcache ]; + extensions = + { all, ... }: + with all; + [ + imagick + opcache + ]; extraConfig = "memory_limit=256M"; }; -in { +in +{ services.phpfpm.pools."foo".phpPackage = myPhp; } ``` @@ -132,9 +159,14 @@ won't work with that project unless those extensions are loaded. Example of building `composer` with additional extensions: ```nix -(php.withExtensions ({ all, enabled }: - enabled ++ (with all; [ imagick redis ])) -).packages.composer +(php.withExtensions ( + { all, enabled }: + enabled + ++ (with all; [ + imagick + redis + ]) +)).packages.composer ``` ### Overriding PHP packages {#ssec-php-user-guide-overriding-packages} @@ -148,7 +180,7 @@ php.override { packageOverrides = final: prev: { extensions = prev.extensions // { mysqlnd = prev.extensions.mysqlnd.overrideAttrs (attrs: { - patches = attrs.patches or [] ++ [ + patches = attrs.patches or [ ] ++ [ # ... ]; }); @@ -235,9 +267,13 @@ php.buildComposerProject (finalAttrs: { # PHP version containing the `ast` extension enabled php = php.buildEnv { - extensions = ({ enabled, all }: enabled ++ (with all; [ - ast - ])); + extensions = ( + { enabled, all }: + enabled + ++ (with all; [ + ast + ]) + ); }; # The composer vendor hash @@ -259,38 +295,45 @@ Here's a working code example to build a PHP library using `mkDerivation` and separate functions and hooks: ```nix -{ stdenvNoCC, fetchFromGitHub, php }: +{ + stdenvNoCC, + fetchFromGitHub, + php, +}: -stdenvNoCC.mkDerivation (finalAttrs: -let - src = fetchFromGitHub { - owner = "git-owner"; - repo = "git-repo"; - rev = finalAttrs.version; - hash = "sha256-VcQRSss2dssfkJ+iUb5qT+FJ10GHiFDzySigcmuVI+8="; - }; -in { - inherit src; - pname = "php-app"; - version = "1.0.0"; +stdenvNoCC.mkDerivation ( + finalAttrs: + let + src = fetchFromGitHub { + owner = "git-owner"; + repo = "git-repo"; + rev = finalAttrs.version; + hash = "sha256-VcQRSss2dssfkJ+iUb5qT+FJ10GHiFDzySigcmuVI+8="; + }; + in + { + inherit src; + pname = "php-app"; + version = "1.0.0"; - buildInputs = [ php ]; + buildInputs = [ php ]; - nativeBuildInputs = [ - php.packages.composer - # This hook will use the attribute `composerRepository` - php.composerHooks.composerInstallHook - ]; + nativeBuildInputs = [ + php.packages.composer + # This hook will use the attribute `composerRepository` + php.composerHooks.composerInstallHook + ]; - composerRepository = php.mkComposerRepository { - inherit (finalAttrs) pname version src; - composerNoDev = true; - composerNoPlugins = true; - composerNoScripts = true; - # Specifying a custom composer.lock since it is not present in the sources. - composerLock = ./composer.lock; - # The composer vendor hash - vendorHash = "sha256-86s/F+/5cBAwBqZ2yaGRM5rTGLmou5//aLRK5SA0WiQ="; - }; -}) + composerRepository = php.mkComposerRepository { + inherit (finalAttrs) pname version src; + composerNoDev = true; + composerNoPlugins = true; + composerNoScripts = true; + # Specifying a custom composer.lock since it is not present in the sources. + composerLock = ./composer.lock; + # The composer vendor hash + vendorHash = "sha256-86s/F+/5cBAwBqZ2yaGRM5rTGLmou5//aLRK5SA0WiQ="; + }; + } +) ``` diff --git a/doc/languages-frameworks/pkg-config.section.md b/doc/languages-frameworks/pkg-config.section.md index 0b25396314cb..f788d5500c0d 100644 --- a/doc/languages-frameworks/pkg-config.section.md +++ b/doc/languages-frameworks/pkg-config.section.md @@ -17,9 +17,12 @@ A good example of all these things is miniz: { pkg-config, testers, ... }: stdenv.mkDerivation (finalAttrs: { - /* ... */ + # ... - nativeBuildInputs = [ pkg-config validatePkgConfig ]; + nativeBuildInputs = [ + pkg-config + validatePkgConfig + ]; passthru.tests.pkg-config = testers.hasPkgConfigModules { package = finalAttrs.finalPackage; @@ -27,7 +30,7 @@ stdenv.mkDerivation (finalAttrs: { }; meta = { - /* ... */ + # ... pkgConfigModules = [ "miniz" ]; }; }) diff --git a/doc/languages-frameworks/python.section.md b/doc/languages-frameworks/python.section.md index c38c14e763b0..119e19f71877 100644 --- a/doc/languages-frameworks/python.section.md +++ b/doc/languages-frameworks/python.section.md @@ -78,24 +78,25 @@ using setup hooks. The following is an example: ```nix -{ lib -, buildPythonPackage -, fetchPypi +{ + lib, + buildPythonPackage, + fetchPypi, -# build-system -, setuptools -, setuptools-scm + # build-system + setuptools, + setuptools-scm, -# dependencies -, attrs -, pluggy -, py -, setuptools -, six + # dependencies + attrs, + pluggy, + py, + setuptools, + six, -# tests -, hypothesis - }: + # tests + hypothesis, +}: buildPythonPackage rec { pname = "pytest"; @@ -134,7 +135,12 @@ buildPythonPackage rec { description = "Framework for writing tests"; homepage = "https://github.com/pytest-dev/pytest"; license = lib.licenses.mit; - maintainers = with lib.maintainers; [ domenkozar lovek323 madjar lsix ]; + maintainers = with lib.maintainers; [ + domenkozar + lovek323 + madjar + lsix + ]; }; } ``` @@ -231,23 +237,31 @@ override first the Python interpreter and pass `packageOverrides` which contains the overrides for packages in the package set. ```nix -with import {}; +with import { }; -(let - python = let - packageOverrides = self: super: { - pandas = super.pandas.overridePythonAttrs(old: rec { - version = "0.19.1"; - src = fetchPypi { - pname = "pandas"; - inherit version; - hash = "sha256-JQn+rtpy/OA2deLszSKEuxyttqBzcAil50H+JDHUdCE="; +( + let + python = + let + packageOverrides = self: super: { + pandas = super.pandas.overridePythonAttrs (old: rec { + version = "0.19.1"; + src = fetchPypi { + pname = "pandas"; + inherit version; + hash = "sha256-JQn+rtpy/OA2deLszSKEuxyttqBzcAil50H+JDHUdCE="; + }; + }); }; - }); - }; - in pkgs.python3.override {inherit packageOverrides; self = python;}; + in + pkgs.python3.override { + inherit packageOverrides; + self = python; + }; -in python.withPackages(ps: [ ps.blaze ])).env + in + python.withPackages (ps: [ ps.blaze ]) +).env ``` The next example shows a non trivial overriding of the `blas` implementation to @@ -258,12 +272,16 @@ be used through out all of the Python package set: python3MyBlas = pkgs.python3.override { packageOverrides = self: super: { # We need toPythonModule for the package set to evaluate this - blas = super.toPythonModule(super.pkgs.blas.override { - blasProvider = super.pkgs.mkl; - }); - lapack = super.toPythonModule(super.pkgs.lapack.override { - lapackProvider = super.pkgs.mkl; - }); + blas = super.toPythonModule ( + super.pkgs.blas.override { + blasProvider = super.pkgs.mkl; + } + ); + lapack = super.toPythonModule ( + super.pkgs.lapack.override { + lapackProvider = super.pkgs.mkl; + } + ); }; }; } @@ -290,9 +308,10 @@ called with `callPackage` and passed `python3` or `python3Packages` (possibly specifying an interpreter version), like this: ```nix -{ lib -, python3Packages -, fetchPypi +{ + lib, + python3Packages, + fetchPypi, }: python3Packages.buildPythonApplication rec { @@ -302,7 +321,7 @@ python3Packages.buildPythonApplication rec { src = fetchPypi { inherit pname version; - hash = "sha256-Pe229rT0aHwA98s+nTHQMEFKZPo/yw6sot8MivFDvAw="; + hash = "sha256-Pe229rT0aHwA98s+nTHQMEFKZPo/yw6sot8MivFDvAw="; }; build-system = with python3Packages; [ @@ -356,10 +375,12 @@ modifications. ```nix { - opencv = toPythonModule (pkgs.opencv.override { - enablePython = true; - pythonPackages = self; - }); + opencv = toPythonModule ( + pkgs.opencv.override { + enablePython = true; + pythonPackages = self; + } + ); } ``` @@ -394,8 +415,10 @@ The `build-system`'s provided will instead become runtime dependencies of the ed Note that overriding packages deeper in the dependency graph _can_ work, but it's not the primary use case and overriding existing packages can make others break in unexpected ways. -``` nix -{ pkgs ? import { } }: +```nix +{ + pkgs ? import { }, +}: let pyproject = pkgs.lib.importTOML ./pyproject.toml; @@ -418,9 +441,10 @@ let }; }; - pythonEnv = myPython.withPackages (ps: [ ps.my-editable ]); + pythonEnv = myPython.withPackages (ps: [ ps.my-editable ]); -in pkgs.mkShell { +in +pkgs.mkShell { packages = [ pythonEnv ]; } ``` @@ -432,7 +456,7 @@ This example shows how to create an environment that has the Pyramid Web Framewo Saving the following as `default.nix` ```nix -with import {}; +with import { }; python3.buildEnv.override { extraLibs = [ python3Packages.pyramid ]; @@ -453,7 +477,7 @@ packages installed. This is somewhat comparable to `virtualenv`. For example, running `nix-shell` with the following `shell.nix` ```nix -with import {}; +with import { }; (python3.buildEnv.override { extraLibs = with python3Packages; [ @@ -483,7 +507,7 @@ of the packages to be included in the environment. Using the [`withPackages`](#p example for the Pyramid Web Framework environment can be written like this: ```nix -with import {}; +with import { }; python.withPackages (ps: [ ps.pyramid ]) ``` @@ -493,7 +517,7 @@ version as an argument to the function. In the above example, `ps` equals `pythonPackages`. But you can also easily switch to using python3: ```nix -with import {}; +with import { }; python3.withPackages (ps: [ ps.pyramid ]) ``` @@ -505,12 +529,14 @@ supports the `env` attribute. The `shell.nix` file from the previous section can thus be also written like this: ```nix -with import {}; +with import { }; -(python3.withPackages (ps: with ps; [ - numpy - requests -])).env +(python3.withPackages ( + ps: with ps; [ + numpy + requests + ] +)).env ``` In contrast to [`python.buildEnv`](#python.buildenv-function), [`python.withPackages`](#python.withpackages-function) does not support the @@ -758,11 +784,13 @@ Say we want to have Python 3.12, `numpy` and `toolz`, like before, in an environment. We can add a `shell.nix` file describing our dependencies: ```nix -with import {}; -(python312.withPackages (ps: with ps; [ - numpy - toolz -])).env +with import { }; +(python312.withPackages ( + ps: with ps; [ + numpy + toolz + ] +)).env ``` And then at the command line, just typing `nix-shell` produces the same @@ -785,13 +813,14 @@ What's happening here? To combine this with `mkShell` you can: ```nix -with import {}; +with import { }; let pythonEnv = python312.withPackages (ps: [ ps.numpy ps.toolz ]); -in mkShell { +in +mkShell { packages = [ pythonEnv @@ -868,10 +897,16 @@ For the sake of completeness, here's how to install the environment system-wide on NixOS. ```nix -{ # ... +{ + # ... environment.systemPackages = with pkgs; [ - (python310.withPackages(ps: with ps; [ numpy toolz ])) + (python310.withPackages ( + ps: with ps; [ + numpy + toolz + ] + )) ]; } ``` @@ -891,10 +926,11 @@ building Python libraries is [`buildPythonPackage`](#buildpythonpackage-function `toolz` package. ```nix -{ lib -, buildPythonPackage -, fetchPypi -, setuptools +{ + lib, + buildPythonPackage, + fetchPypi, + setuptools, }: buildPythonPackage rec { @@ -952,9 +988,10 @@ The following expression creates a derivation for the `toolz` package, and adds it along with a `numpy` package to a Python environment. ```nix -with import {}; +with import { }; -( let +( + let my_toolz = python312.pkgs.buildPythonPackage rec { pname = "toolz"; version = "0.10.0"; @@ -979,10 +1016,13 @@ with import {}; }; }; - in python312.withPackages (ps: with ps; [ - numpy - my_toolz - ]) + in + python312.withPackages ( + ps: with ps; [ + numpy + my_toolz + ] + ) ).env ``` @@ -1014,18 +1054,21 @@ The following example shows which arguments are given to [`buildPythonPackage`]( order to build [`datashape`](https://github.com/blaze/datashape). ```nix -{ lib -, buildPythonPackage -, fetchPypi +{ + lib, + buildPythonPackage, + fetchPypi, -# build dependencies -, setuptools + # build dependencies + setuptools, -# dependencies -, numpy, multipledispatch, python-dateutil + # dependencies + numpy, + multipledispatch, + python-dateutil, -# tests -, pytestCheckHook + # tests + pytestCheckHook, }: buildPythonPackage rec { @@ -1072,12 +1115,13 @@ Python bindings to `libxml2` and `libxslt`. These libraries are only required when building the bindings and are therefore added as [`buildInputs`](#var-stdenv-buildInputs). ```nix -{ lib -, buildPythonPackage -, fetchPypi -, setuptools -, libxml2 -, libxslt +{ + lib, + buildPythonPackage, + fetchPypi, + setuptools, + libxml2, + libxslt, }: buildPythonPackage rec { @@ -1128,19 +1172,20 @@ The bindings don't expect to find each of them in a different folder, and therefore we have to set `LDFLAGS` and `CFLAGS`. ```nix -{ lib -, buildPythonPackage -, fetchPypi +{ + lib, + buildPythonPackage, + fetchPypi, -# build dependencies -, setuptools + # build dependencies + setuptools, -# dependencies -, fftw -, fftwFloat -, fftwLongDouble -, numpy -, scipy + # dependencies + fftw, + fftwFloat, + fftwLongDouble, + numpy, + scipy, }: buildPythonPackage rec { @@ -1182,7 +1227,10 @@ buildPythonPackage rec { changelog = "https://github.com/pyFFTW/pyFFTW/releases/tag/v${version}"; description = "Pythonic wrapper around FFTW, the FFT library, presenting a unified interface for all the supported transforms"; homepage = "http://hgomersall.github.com/pyFFTW"; - license = with lib.licenses; [ bsd2 bsd3 ]; + license = with lib.licenses; [ + bsd2 + bsd3 + ]; }; } ``` @@ -1360,17 +1408,20 @@ This is especially helpful to select tests or specify flags conditionally: ```nix { - disabledTests = [ - # touches network - "download" - "update" - ] ++ lib.optionals (pythonAtLeast "3.8") [ - # broken due to python3.8 async changes - "async" - ] ++ lib.optionals stdenv.buildPlatform.isDarwin [ - # can fail when building with other packages - "socket" - ]; + disabledTests = + [ + # touches network + "download" + "update" + ] + ++ lib.optionals (pythonAtLeast "3.8") [ + # broken due to python3.8 async changes + "async" + ] + ++ lib.optionals stdenv.buildPlatform.isDarwin [ + # can fail when building with other packages + "socket" + ]; } ``` @@ -1495,7 +1546,9 @@ automatically add `pythonRelaxDepsHook` if either `pythonRelaxDeps` or ]; unittestFlags = [ - "-s" "tests" "-v" + "-s" + "tests" + "-v" ]; } ``` @@ -1576,10 +1629,11 @@ Let's split the package definition from the environment definition. We first create a function that builds `toolz` in `~/path/to/toolz/release.nix` ```nix -{ lib -, buildPythonPackage -, fetchPypi -, setuptools +{ + lib, + buildPythonPackage, + fetchPypi, + setuptools, }: buildPythonPackage rec { @@ -1609,13 +1663,15 @@ It takes an argument [`buildPythonPackage`](#buildpythonpackage-function). We no `callPackage` in the definition of our environment ```nix -with import {}; +with import { }; -( let +( + let toolz = callPackage /path/to/toolz/release.nix { buildPythonPackage = python3Packages.buildPythonPackage; }; - in python3.withPackages (ps: [ + in + python3.withPackages (ps: [ ps.numpy toolz ]) @@ -1643,20 +1699,27 @@ We can override the interpreter and pass `packageOverrides`. In the following example we rename the `pandas` package and build it. ```nix -with import {}; +with import { }; -(let - python = let - packageOverrides = self: super: { - pandas = super.pandas.overridePythonAttrs(old: {name="foo";}); - }; - in pkgs.python310.override { - inherit packageOverrides; - }; +( + let + python = + let + packageOverrides = self: super: { + pandas = super.pandas.overridePythonAttrs (old: { + name = "foo"; + }); + }; + in + pkgs.python310.override { + inherit packageOverrides; + }; -in python.withPackages (ps: [ - ps.pandas -])).env + in + python.withPackages (ps: [ + ps.pandas + ]) +).env ``` Using `nix-build` on this expression will build an environment that contains the @@ -1670,17 +1733,20 @@ environment that uses it. All packages in the Python package set will now use the updated `scipy` version. ```nix -with import {}; +with import { }; -( let +( + let packageOverrides = self: super: { scipy = super.scipy_0_17; }; - in (pkgs.python310.override { + in + (pkgs.python310.override { inherit packageOverrides; - }).withPackages (ps: [ - ps.blaze - ]) + }).withPackages + (ps: [ + ps.blaze + ]) ).env ``` @@ -1692,15 +1758,22 @@ If you want the whole of Nixpkgs to use your modifications, then you can use ```nix let - pkgs = import {}; - newpkgs = import pkgs.path { overlays = [ (self: super: { - python310 = let - packageOverrides = python-self: python-super: { - numpy = python-super.numpy_1_18; - }; - in super.python310.override {inherit packageOverrides;}; - } ) ]; }; -in newpkgs.inkscape + pkgs = import { }; + newpkgs = import pkgs.path { + overlays = [ + (self: super: { + python310 = + let + packageOverrides = python-self: python-super: { + numpy = python-super.numpy_1_18; + }; + in + super.python310.override { inherit packageOverrides; }; + }) + ]; + }; +in +newpkgs.inkscape ``` ### `python setup.py bdist_wheel` cannot create .whl {#python-setup.py-bdist_wheel-cannot-create-.whl} @@ -1790,7 +1863,8 @@ with import { }; let pythonPackages = python3Packages; -in pkgs.mkShell rec { +in +pkgs.mkShell rec { name = "impurePythonEnv"; venvDir = "./.venv"; buildInputs = [ @@ -1845,7 +1919,8 @@ with import { }; let venvDir = "./.venv"; pythonPackages = python3Packages; -in pkgs.mkShell rec { +in +pkgs.mkShell rec { name = "impurePythonEnv"; buildInputs = [ pythonPackages.python @@ -1957,13 +2032,11 @@ The following overlay overrides the call to [`buildPythonPackage`](#buildpythonp ```nix final: prev: { pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [ - ( - python-final: python-prev: { - foo = python-prev.foo.overridePythonAttrs (oldAttrs: { - # ... - }); - } - ) + (python-final: python-prev: { + foo = python-prev.foo.overridePythonAttrs (oldAttrs: { + # ... + }); + }) ]; } ``` @@ -1989,13 +2062,14 @@ interpreter of interest, e.g using ```nix let - pkgs = import ./. {}; + pkgs = import ./. { }; mypython = pkgs.python3.override { enableOptimizations = true; reproducibleBuild = false; self = mypython; }; -in mypython +in +mypython ``` ### How to add optional dependencies? {#python-optional-dependencies} diff --git a/doc/languages-frameworks/qt.section.md b/doc/languages-frameworks/qt.section.md index 9b3d1e054a62..cdbcb3aefb7c 100644 --- a/doc/languages-frameworks/qt.section.md +++ b/doc/languages-frameworks/qt.section.md @@ -64,14 +64,18 @@ and then create wrappers manually in `fixupPhase`, using `wrapQtApp`, which itse The `makeWrapper` arguments required for Qt are also exposed in the environment as `$qtWrapperArgs`. ```nix -{ stdenv, lib, wrapQtAppsHook }: +{ + stdenv, + lib, + wrapQtAppsHook, +}: stdenv.mkDerivation { # ... nativeBuildInputs = [ wrapQtAppsHook ]; dontWrapQtApps = true; preFixup = '' - wrapQtApp "$out/bin/myapp" --prefix PATH : /path/to/bin + wrapQtApp "$out/bin/myapp" --prefix PATH : /path/to/bin ''; } ``` diff --git a/doc/languages-frameworks/r.section.md b/doc/languages-frameworks/r.section.md index d25c5e848232..efbd170cd034 100644 --- a/doc/languages-frameworks/r.section.md +++ b/doc/languages-frameworks/r.section.md @@ -7,18 +7,22 @@ use by adding the following snippet to your $HOME/.config/nixpkgs/config.nix fil ```nix { - packageOverrides = super: let self = super.pkgs; in + packageOverrides = + super: + let + self = super.pkgs; + in { - rEnv = super.rWrapper.override { - packages = with self.rPackages; [ - devtools - ggplot2 - reshape2 - yaml - optparse - ]; - }; + rEnv = super.rWrapper.override { + packages = with self.rPackages; [ + devtools + ggplot2 + reshape2 + yaml + optparse + ]; + }; }; } ``` @@ -33,7 +37,7 @@ environment available for other contributors, you can create a `default.nix` file like so: ```nix -with import {}; +with import { }; { myProject = stdenv.mkDerivation { name = "myProject"; @@ -60,16 +64,20 @@ environment, see `rstudioWrapper`, which functions similarly to ```nix { - packageOverrides = super: let self = super.pkgs; in + packageOverrides = + super: + let + self = super.pkgs; + in { - rstudioEnv = super.rstudioWrapper.override { - packages = with self.rPackages; [ - dplyr - ggplot2 - reshape2 - ]; - }; + rstudioEnv = super.rstudioWrapper.override { + packages = with self.rPackages; [ + dplyr + ggplot2 + reshape2 + ]; + }; }; } ``` @@ -81,13 +89,17 @@ Alternatively, you can create a self-contained `shell.nix` without the need to modify any configuration files: ```nix -{ pkgs ? import {} +{ + pkgs ? import { }, }: pkgs.rstudioWrapper.override { - packages = with pkgs.rPackages; [ dplyr ggplot2 reshape2 ]; + packages = with pkgs.rPackages; [ + dplyr + ggplot2 + reshape2 + ]; } - ``` Executing `nix-shell` will then drop you into an environment equivalent to the diff --git a/doc/languages-frameworks/ruby.section.md b/doc/languages-frameworks/ruby.section.md index 41985e755188..d11078aacaf2 100644 --- a/doc/languages-frameworks/ruby.section.md +++ b/doc/languages-frameworks/ruby.section.md @@ -36,8 +36,13 @@ As explained [in the `nix-shell` section](https://nixos.org/manual/nix/stable/co Say we want to have Ruby, `nokogori`, and `pry`. Consider a `shell.nix` file with: ```nix -with import {}; -ruby.withPackages (ps: with ps; [ nokogiri pry ]) +with import { }; +ruby.withPackages ( + ps: with ps; [ + nokogiri + pry + ] +) ``` What's happening here? @@ -107,7 +112,13 @@ let name = "gems-for-some-project"; gemdir = ./.; }; -in mkShell { packages = [ gems gems.wrappedRuby ]; } +in +mkShell { + packages = [ + gems + gems.wrappedRuby + ]; +} ``` With this file in your directory, you can run `nix-shell` to build and use the gems. The important parts here are `bundlerEnv` and `wrappedRuby`. @@ -118,7 +129,12 @@ One common issue that you might have is that you have Ruby, but also `bundler` i ```nix # ... -mkShell { buildInputs = [ gems (lowPrio gems.wrappedRuby) ]; } +mkShell { + buildInputs = [ + gems + (lowPrio gems.wrappedRuby) + ]; +} ``` Sometimes a Gemfile references other files. Such as `.ruby-version` or vendored gems. When copying the Gemfile to the nix store we need to copy those files alongside. This can be done using `extraConfigPaths`. For example: @@ -148,41 +164,54 @@ Two places that allow this modification are the `ruby` derivation, or `bundlerEn Here's the `ruby` one: ```nix -{ pg_version ? "10", pkgs ? import { } }: +{ + pg_version ? "10", + pkgs ? import { }, +}: let myRuby = pkgs.ruby.override { defaultGemConfig = pkgs.defaultGemConfig // { pg = attrs: { - buildFlags = - [ "--with-pg-config=${pkgs."postgresql_${pg_version}".pg_config}/bin/pg_config" ]; + buildFlags = [ "--with-pg-config=${pkgs."postgresql_${pg_version}".pg_config}/bin/pg_config" ]; }; }; }; -in myRuby.withPackages (ps: with ps; [ pg ]) +in +myRuby.withPackages (ps: with ps; [ pg ]) ``` And an example with `bundlerEnv`: ```nix -{ pg_version ? "10", pkgs ? import { } }: +{ + pg_version ? "10", + pkgs ? import { }, +}: let gems = pkgs.bundlerEnv { name = "gems-for-some-project"; gemdir = ./.; gemConfig = pkgs.defaultGemConfig // { pg = attrs: { - buildFlags = - [ "--with-pg-config=${pkgs."postgresql_${pg_version}".pg_config}/bin/pg_config" ]; + buildFlags = [ "--with-pg-config=${pkgs."postgresql_${pg_version}".pg_config}/bin/pg_config" ]; }; }; }; -in mkShell { buildInputs = [ gems gems.wrappedRuby ]; } +in +mkShell { + buildInputs = [ + gems + gems.wrappedRuby + ]; +} ``` And finally via overlays: ```nix -{ pg_version ? "10" }: +{ + pg_version ? "10", +}: let pkgs = import { overlays = [ @@ -197,7 +226,8 @@ let }) ]; }; -in pkgs.ruby.withPackages (ps: with ps; [ pg ]) +in +pkgs.ruby.withPackages (ps: with ps; [ pg ]) ``` Then we can get whichever postgresql version we desire and the `pg` gem will always reference it correctly: @@ -278,7 +308,14 @@ Of course you could also make a custom `gemConfig` if you know exactly how to pa Here's another example: ```nix -{ lib, bundlerApp, makeWrapper, git, gnutar, gzip }: +{ + lib, + bundlerApp, + makeWrapper, + git, + gnutar, + gzip, +}: bundlerApp { pname = "r10k"; @@ -288,7 +325,13 @@ bundlerApp { nativeBuildInputs = [ makeWrapper ]; postBuild = '' - wrapProgram $out/bin/r10k --prefix PATH : ${lib.makeBinPath [ git gnutar gzip ]} + wrapProgram $out/bin/r10k --prefix PATH : ${ + lib.makeBinPath [ + git + gnutar + gzip + ] + } ''; } ``` diff --git a/doc/languages-frameworks/rust.section.md b/doc/languages-frameworks/rust.section.md index 34ac80cac998..20d8b4824620 100644 --- a/doc/languages-frameworks/rust.section.md +++ b/doc/languages-frameworks/rust.section.md @@ -22,7 +22,11 @@ or use [community maintained Rust toolchains](#using-community-maintained-rust-t Rust applications are packaged by using the `buildRustPackage` helper from `rustPlatform`: ```nix -{ lib, fetchFromGitHub, rustPlatform }: +{ + lib, + fetchFromGitHub, + rustPlatform, +}: rustPlatform.buildRustPackage rec { pname = "ripgrep"; @@ -151,11 +155,13 @@ rustPlatform.buildRustPackage { pname = "myproject"; version = "1.0.0"; - cargoLock = let - fixupLockFile = path: f (builtins.readFile path); - in { - lockFileContents = fixupLockFile ./Cargo.lock; - }; + cargoLock = + let + fixupLockFile = path: f (builtins.readFile path); + in + { + lockFileContents = fixupLockFile ./Cargo.lock; + }; # ... } @@ -234,7 +240,10 @@ rustPlatform.buildRustPackage rec { version = "1.0.0"; buildNoDefaultFeatures = true; - buildFeatures = [ "color" "net" ]; + buildFeatures = [ + "color" + "net" + ]; # disable network features in tests checkFeatures = [ "color" ]; @@ -283,7 +292,10 @@ where they are known to differ. But there are ways to customize the argument: import { crossSystem = (import ).systems.examples.armhf-embedded // { rust.rustcTarget = "thumb-crazy"; - rust.platform = { foo = ""; bar = ""; }; + rust.platform = { + foo = ""; + bar = ""; + }; }; } ``` @@ -310,7 +322,7 @@ so: ```nix rustPlatform.buildRustPackage { - /* ... */ + # ... checkType = "debug"; } ``` @@ -353,7 +365,7 @@ This can be achieved with `--skip` in `checkFlags`: ```nix rustPlatform.buildRustPackage { - /* ... */ + # ... checkFlags = [ # reason for disabling test "--skip=example::tests:example_test" @@ -370,7 +382,7 @@ adapted to be compatible with cargo-nextest. ```nix rustPlatform.buildRustPackage { - /* ... */ + # ... useNextest = true; } ``` @@ -382,7 +394,7 @@ sometimes it may be necessary to disable this so the tests run consecutively. ```nix rustPlatform.buildRustPackage { - /* ... */ + # ... dontUseCargoParallelTests = true; } ``` @@ -394,7 +406,7 @@ should be built in `debug` mode, it can be configured like so: ```nix rustPlatform.buildRustPackage { - /* ... */ + # ... buildType = "debug"; } ``` @@ -548,12 +560,13 @@ directory of the `tokenizers` project's source archive, we use `sourceRoot` to point the tooling to this directory: ```nix -{ fetchFromGitHub -, buildPythonPackage -, cargo -, rustPlatform -, rustc -, setuptools-rust +{ + fetchFromGitHub, + buildPythonPackage, + cargo, + rustPlatform, + rustc, + setuptools-rust, }: buildPythonPackage rec { @@ -568,7 +581,12 @@ buildPythonPackage rec { }; cargoDeps = rustPlatform.fetchCargoVendor { - inherit pname version src sourceRoot; + inherit + pname + version + src + sourceRoot + ; hash = "sha256-RO1m8wEd5Ic2M9q+zFHeCJWhCr4Sv3CEWd08mkxsBec="; }; @@ -593,12 +611,12 @@ following example, the crate is in `src/rust`, as specified in the path for `fetchCargoVendor`. ```nix - -{ buildPythonPackage -, fetchPypi -, rustPlatform -, setuptools-rust -, openssl +{ + buildPythonPackage, + fetchPypi, + rustPlatform, + setuptools-rust, + openssl, }: buildPythonPackage rec { @@ -632,10 +650,11 @@ builds the `retworkx` Python package. `fetchCargoVendor` and `maturinBuildHook` is used to perform the build. ```nix -{ lib -, buildPythonPackage -, rustPlatform -, fetchFromGitHub +{ + lib, + buildPythonPackage, + rustPlatform, + fetchFromGitHub, }: buildPythonPackage rec { @@ -655,7 +674,10 @@ buildPythonPackage rec { hash = "sha256-QsPCQhNZKYCAogQriQX6pBYQUDAIUsEdRX/63dAqTzg="; }; - nativeBuildInputs = with rustPlatform; [ cargoSetupHook maturinBuildHook ]; + nativeBuildInputs = with rustPlatform; [ + cargoSetupHook + maturinBuildHook + ]; # ... } @@ -666,20 +688,21 @@ buildPythonPackage rec { Some projects, especially GNOME applications, are built with the Meson Build System instead of calling Cargo directly. Using `rustPlatform.buildRustPackage` may successfully build the main program, but related files will be missing. Instead, you need to set up Cargo dependencies with `fetchCargoVendor` and `cargoSetupHook` and leave the rest to Meson. `rust` and `cargo` are still needed in `nativeBuildInputs` for Meson to use. ```nix -{ lib -, stdenv -, fetchFromGitLab -, meson -, ninja -, pkg-config -, rustPlatform -, rustc -, cargo -, wrapGAppsHook4 -, blueprint-compiler -, libadwaita -, libsecret -, tinysparql +{ + lib, + stdenv, + fetchFromGitLab, + meson, + ninja, + pkg-config, + rustPlatform, + rustc, + cargo, + wrapGAppsHook4, + blueprint-compiler, + libadwaita, + libsecret, + tinysparql, }: stdenv.mkDerivation rec { @@ -744,8 +767,8 @@ Starting from that file, one can add more overrides, to add features or build inputs by overriding the hello crate in a separate file. ```nix -with import {}; -((import ./hello.nix).hello {}).override { +with import { }; +((import ./hello.nix).hello { }).override { crateOverrides = defaultCrateOverrides // { hello = attrs: { buildInputs = [ openssl ]; }; }; @@ -764,15 +787,17 @@ the override above can be read, as in the following example, which patches the derivation: ```nix -with import {}; -((import ./hello.nix).hello {}).override { +with import { }; +((import ./hello.nix).hello { }).override { crateOverrides = defaultCrateOverrides // { - hello = attrs: lib.optionalAttrs (lib.versionAtLeast attrs.version "1.0") { - postPatch = '' - substituteInPlace lib/zoneinfo.rs \ - --replace-fail "/usr/share/zoneinfo" "${tzdata}/share/zoneinfo" - ''; - }; + hello = + attrs: + lib.optionalAttrs (lib.versionAtLeast attrs.version "1.0") { + postPatch = '' + substituteInPlace lib/zoneinfo.rs \ + --replace-fail "/usr/share/zoneinfo" "${tzdata}/share/zoneinfo" + ''; + }; }; } ``` @@ -785,10 +810,10 @@ dependencies. For instance, to override the build inputs for crate crate, we could do: ```nix -with import {}; -((import hello.nix).hello {}).override { +with import { }; +((import hello.nix).hello { }).override { crateOverrides = defaultCrateOverrides // { - libc = attrs: { buildInputs = []; }; + libc = attrs: { buildInputs = [ ]; }; }; } ``` @@ -801,27 +826,27 @@ general. A number of other parameters can be overridden: - The version of `rustc` used to compile the crate: ```nix - (hello {}).override { rust = pkgs.rust; } + (hello { }).override { rust = pkgs.rust; } ``` - Whether to build in release mode or debug mode (release mode by default): ```nix - (hello {}).override { release = false; } + (hello { }).override { release = false; } ``` - Whether to print the commands sent to `rustc` when building (equivalent to `--verbose` in cargo: ```nix - (hello {}).override { verbose = false; } + (hello { }).override { verbose = false; } ``` - Extra arguments to be passed to `rustc`: ```nix - (hello {}).override { extraRustcOpts = "-Z debuginfo=2"; } + (hello { }).override { extraRustcOpts = "-Z debuginfo=2"; } ``` - Phases, just like in any other derivation, can be specified using @@ -833,9 +858,9 @@ general. A number of other parameters can be overridden: before running the build script: ```nix - (hello {}).override { + (hello { }).override { preConfigure = '' - echo "pub const PATH=\"${hi.out}\";" >> src/path.rs" + echo "pub const PATH=\"${hi.out}\";" >> src/path.rs" ''; } ``` @@ -856,12 +881,13 @@ Using the example `hello` project above, we want to do the following: A typical `shell.nix` might look like: ```nix -with import {}; +with import { }; stdenv.mkDerivation { name = "rust-env"; nativeBuildInputs = [ - rustc cargo + rustc + cargo # Example Build-time Additional Dependencies pkg-config @@ -917,15 +943,13 @@ Here is a simple `shell.nix` that provides Rust nightly (default profile) using ```nix with import { }; let - fenix = callPackage - (fetchFromGitHub { - owner = "nix-community"; - repo = "fenix"; - # commit from: 2023-03-03 - rev = "e2ea04982b892263c4d939f1cc3bf60a9c4deaa1"; - hash = "sha256-AsOim1A8KKtMWIxG+lXh5Q4P2bhOZjoUhFWJ1EuZNNk="; - }) - { }; + fenix = callPackage (fetchFromGitHub { + owner = "nix-community"; + repo = "fenix"; + # commit from: 2023-03-03 + rev = "e2ea04982b892263c4d939f1cc3bf60a9c4deaa1"; + hash = "sha256-AsOim1A8KKtMWIxG+lXh5Q4P2bhOZjoUhFWJ1EuZNNk="; + }) { }; in mkShell { name = "rust-env"; @@ -964,8 +988,7 @@ You can also use Rust nightly to build rust packages using `makeRustPlatform`. The below snippet demonstrates invoking `buildRustPackage` with a Rust toolchain from oxalica's overlay: ```nix -with import -{ +with import { overlays = [ (import (fetchTarball "https://github.com/oxalica/rust-overlay/archive/master.tar.gz")) ]; @@ -996,8 +1019,11 @@ rustPlatform.buildRustPackage rec { meta = { description = "Fast line-oriented regex search tool, similar to ag and ack"; homepage = "https://github.com/BurntSushi/ripgrep"; - license = with lib.licenses; [ mit unlicense ]; - maintainers = with lib.maintainers; []; + license = with lib.licenses; [ + mit + unlicense + ]; + maintainers = with lib.maintainers; [ ]; }; } ``` @@ -1029,19 +1055,28 @@ with the path into which you have `git clone`d the `rustc` git repository: ```nix - (final: prev: /*lib.optionalAttrs prev.stdenv.targetPlatform.isAarch64*/ { - rust_1_72 = - lib.updateManyAttrsByPath [{ - path = [ "packages" "stable" ]; - update = old: old.overrideScope(final: prev: { - rustc-unwrapped = prev.rustc-unwrapped.overrideAttrs (_: { - src = lib.cleanSource /git/scratch/rust; - # do *not* put passthru.isReleaseTarball=true here - }); - }); - }] - prev.rust_1_72; - }) +( + final: prev: # lib.optionalAttrs prev.stdenv.targetPlatform.isAarch64 + { + rust_1_72 = lib.updateManyAttrsByPath [ + { + path = [ + "packages" + "stable" + ]; + update = + old: + old.overrideScope ( + final: prev: { + rustc-unwrapped = prev.rustc-unwrapped.overrideAttrs (_: { + src = lib.cleanSource /git/scratch/rust; + # do *not* put passthru.isReleaseTarball=true here + }); + } + ); + } + ] prev.rust_1_72; + }) ``` If the problem you're troubleshooting only manifests when diff --git a/doc/languages-frameworks/swift.section.md b/doc/languages-frameworks/swift.section.md index 88d98deeb2dd..50fbd511aca9 100644 --- a/doc/languages-frameworks/swift.section.md +++ b/doc/languages-frameworks/swift.section.md @@ -69,7 +69,13 @@ This produces some files in a directory `nix`, which will be part of your Nix expression. The next step is to write that expression: ```nix -{ stdenv, swift, swiftpm, swiftpm2nix, fetchFromGitHub }: +{ + stdenv, + swift, + swiftpm, + swiftpm2nix, + fetchFromGitHub, +}: let # Pass the generated files to the helper. @@ -90,7 +96,10 @@ stdenv.mkDerivation rec { # Including SwiftPM as a nativeBuildInput provides a buildPhase for you. # This by default performs a release build using SwiftPM, essentially: # swift build -c release - nativeBuildInputs = [ swift swiftpm ]; + nativeBuildInputs = [ + swift + swiftpm + ]; # The helper provides a configure snippet that will prepare all dependencies # in the correct place, where SwiftPM expects them. diff --git a/doc/languages-frameworks/texlive.section.md b/doc/languages-frameworks/texlive.section.md index a31a4357a22f..9256c9c38ce7 100644 --- a/doc/languages-frameworks/texlive.section.md +++ b/doc/languages-frameworks/texlive.section.md @@ -10,7 +10,13 @@ Release 23.11 ships with a new interface that will eventually replace `texlive.c - Packages cannot be used directly but must be assembled in an environment. To create or add packages to an environment, use ```nix - texliveSmall.withPackages (ps: with ps; [ collection-langkorean algorithms cm-super ]) + texliveSmall.withPackages ( + ps: with ps; [ + collection-langkorean + algorithms + cm-super + ] + ) ``` The function `withPackages` can be called multiple times to add more packages. @@ -18,12 +24,14 @@ Release 23.11 ships with a new interface that will eventually replace `texlive.c - `texlive.withPackages` uses the same logic as `buildEnv`. Only parts of a package are installed in an environment: its 'runtime' files (`tex` output), binaries (`out` output), and support files (`tlpkg` output). Moreover, man and info pages are assembled into separate `man` and `info` outputs. To add only the TeX files of a package, or its documentation (`texdoc` output), just specify the outputs: ```nix - texlive.withPackages (ps: with ps; [ - texdoc # recommended package to navigate the documentation - perlPackages.LaTeXML.tex # tex files of LaTeXML, omit binaries - cm-super - cm-super.texdoc # documentation of cm-super - ]) + texlive.withPackages ( + ps: with ps; [ + texdoc # recommended package to navigate the documentation + perlPackages.LaTeXML.tex # tex files of LaTeXML, omit binaries + cm-super + cm-super.texdoc # documentation of cm-super + ] + ) ``` - All packages distributed by TeX Live, which contains most of CTAN, are available and can be found under `texlive.pkgs`: @@ -50,7 +58,12 @@ Release 23.11 ships with a new interface that will eventually replace `texlive.c ```nix texlive.combine { - inherit (texlive) scheme-small collection-langkorean algorithms cm-super; + inherit (texlive) + scheme-small + collection-langkorean + algorithms + cm-super + ; } ``` @@ -61,8 +74,8 @@ Release 23.11 ships with a new interface that will eventually replace `texlive.c ```nix texlive.combine { # inherit (texlive) whatever-you-want; - pkgFilter = pkg: - pkg.tlType == "run" || pkg.tlType == "bin" || pkg.hasManpages || pkg.pname == "cm-super"; + pkgFilter = + pkg: pkg.tlType == "run" || pkg.tlType == "bin" || pkg.hasManpages || pkg.pname == "cm-super"; # elem tlType [ "run" "bin" "doc" "source" ] # there are also other attributes: version, name } @@ -114,14 +127,17 @@ When using `pkgFilter`, `texlive.combine` will assign `tlType` respectively `"bi Here is a (very verbose) example. See also the packages `auctex`, `eukleides`, `mftrace` for more examples. ```nix -with import {}; +with import { }; let foiltex = stdenvNoCC.mkDerivation { pname = "latex-foiltex"; version = "2.1.4b"; - outputs = [ "tex" "texdoc" ]; + outputs = [ + "tex" + "texdoc" + ]; passthru.tlDeps = with texlive; [ latex ]; srcs = [ @@ -146,7 +162,13 @@ let ''; nativeBuildInputs = [ - (texliveSmall.withPackages (ps: with ps; [ cm-super hypdoc latexmk ])) + (texliveSmall.withPackages ( + ps: with ps; [ + cm-super + hypdoc + latexmk + ] + )) # multiple-outputs.sh fails if $out is not defined (writeShellScript "force-tex-output.sh" '' out="''${tex-}" @@ -192,22 +214,24 @@ let latex_with_foiltex = texliveSmall.withPackages (_: [ foiltex ]); in - runCommand "test.pdf" { +runCommand "test.pdf" + { nativeBuildInputs = [ latex_with_foiltex ]; - } '' -cat >test.tex <test.tex < main.tex - env HOME=$(mktemp -d) lualatex -interaction=nonstopmode -output-format=pdf -output-directory=$out ./main.tex -'' +runCommandNoCC "lualatex-hello-world" + { + buildInputs = [ texliveFull ]; + } + '' + mkdir $out + echo '\documentclass{article} \begin{document} Hello world \end{document}' > main.tex + env HOME=$(mktemp -d) lualatex -interaction=nonstopmode -output-format=pdf -output-directory=$out ./main.tex + '' ``` Additionally, [the cache of a user can diverge from the nix store](https://github.com/NixOS/nixpkgs/issues/278718). diff --git a/doc/languages-frameworks/vim.section.md b/doc/languages-frameworks/vim.section.md index da139623a25c..f42995d94693 100644 --- a/doc/languages-frameworks/vim.section.md +++ b/doc/languages-frameworks/vim.section.md @@ -47,11 +47,17 @@ To store your plugins in Vim packages (the native Vim plugin manager, see `:help vim-full.customize { vimrcConfig.packages.myVimPackage = with pkgs.vimPlugins; { # loaded on launch - start = [ youcompleteme fugitive ]; + start = [ + youcompleteme + fugitive + ]; # manually loadable by calling `:packadd $plugin-name` # however, if a Vim plugin has a dependency that is not explicitly listed in # opt that dependency will always be added to start to avoid confusion. - opt = [ phpCompletion elm-vim ]; + opt = [ + phpCompletion + elm-vim + ]; # To automatically load a plugin when opening a filetype, add vimrc lines like: # autocmd FileType php :packadd phpCompletion }; @@ -63,18 +69,19 @@ The resulting package can be added to `packageOverrides` in `~/.nixpkgs/config.n ```nix { - packageOverrides = pkgs: with pkgs; { - myVim = vim-full.customize { - # `name` specifies the name of the executable and package - name = "vim-with-plugins"; - # add here code from the example section - }; - myNeovim = neovim.override { - configure = { - # add code from the example section here + packageOverrides = + pkgs: with pkgs; { + myVim = vim-full.customize { + # `name` specifies the name of the executable and package + name = "vim-with-plugins"; + # add here code from the example section + }; + myNeovim = neovim.override { + configure = { + # add code from the example section here + }; }; }; - }; } ``` @@ -100,20 +107,18 @@ let in { environment.systemPackages = [ - ( - pkgs.neovim.override { - configure = { - packages.myPlugins = with pkgs.vimPlugins; { + (pkgs.neovim.override { + configure = { + packages.myPlugins = with pkgs.vimPlugins; { start = [ vim-go # already packaged plugin easygrep # custom package ]; - opt = []; + opt = [ ]; }; # ... }; - } - ) + }) ]; } ``` @@ -129,7 +134,12 @@ plugins the following example can be used: vim-full.customize { vimrcConfig.packages.myVimPackage = with pkgs.vimPlugins; { # loaded on launch - plug.plugins = [ youcompleteme fugitive phpCompletion elm-vim ]; + plug.plugins = [ + youcompleteme + fugitive + phpCompletion + elm-vim + ]; }; } ``` @@ -147,8 +157,11 @@ Some plugins require overrides in order to function properly. Overrides are plac ```nix { - deoplete-fish = super.deoplete-fish.overrideAttrs(old: { - dependencies = with super; [ deoplete-nvim vim-fish ]; + deoplete-fish = super.deoplete-fish.overrideAttrs (old: { + dependencies = with super; [ + deoplete-nvim + vim-fish + ]; }); } ``` @@ -199,9 +212,7 @@ You can then reference the generated vim plugins via: ```nix { - myVimPlugins = pkgs.vimPlugins.extend ( - (pkgs.callPackage ./generated.nix {}) - ); + myVimPlugins = pkgs.vimPlugins.extend ((pkgs.callPackage ./generated.nix { })); } ``` diff --git a/doc/packages/cataclysm-dda.section.md b/doc/packages/cataclysm-dda.section.md index f401e9b9efa5..2e7d86f951b8 100644 --- a/doc/packages/cataclysm-dda.section.md +++ b/doc/packages/cataclysm-dda.section.md @@ -48,7 +48,7 @@ let # Unfortunately, this refers to the package before overriding and # parallel building is still disabled. - badExample = myCDDA.withMods (_: []); + badExample = myCDDA.withMods (_: [ ]); inherit (cataclysmDDA) attachPkgs pkgs wrapCDDA; @@ -66,7 +66,7 @@ in # badExample # parallel building disabled # goodExample1.withMods (_: []) # parallel building enabled -goodExample2.withMods (_: []) # parallel building enabled +goodExample2.withMods (_: [ ]) # parallel building enabled ``` ## Customizing with mods {#customizing-with-mods} @@ -75,9 +75,11 @@ To install Cataclysm DDA with mods of your choice, you can use `withMods` attribute: ```nix -cataclysm-dda.withMods (mods: with mods; [ - tileset.UndeadPeople -]) +cataclysm-dda.withMods ( + mods: with mods; [ + tileset.UndeadPeople + ] +) ``` All mods, soundpacks, and tilesets available in nixpkgs are found in @@ -88,42 +90,46 @@ in nixpkgs: ```nix let - customMods = self: super: lib.recursiveUpdate super { - # Modify existing mod - tileset.UndeadPeople = super.tileset.UndeadPeople.overrideAttrs (old: { - # If you like to apply a patch to the tileset for example - patches = [ ./path/to/your.patch ]; - }); + customMods = + self: super: + lib.recursiveUpdate super { + # Modify existing mod + tileset.UndeadPeople = super.tileset.UndeadPeople.overrideAttrs (old: { + # If you like to apply a patch to the tileset for example + patches = [ ./path/to/your.patch ]; + }); - # Add another mod - mod.Awesome = cataclysmDDA.buildMod { - modName = "Awesome"; - version = "0.x"; - src = fetchFromGitHub { - owner = "Someone"; - repo = "AwesomeMod"; - rev = "..."; - hash = "..."; + # Add another mod + mod.Awesome = cataclysmDDA.buildMod { + modName = "Awesome"; + version = "0.x"; + src = fetchFromGitHub { + owner = "Someone"; + repo = "AwesomeMod"; + rev = "..."; + hash = "..."; + }; + # Path to be installed in the unpacked source (default: ".") + modRoot = "contents/under/this/path/will/be/installed"; }; - # Path to be installed in the unpacked source (default: ".") - modRoot = "contents/under/this/path/will/be/installed"; - }; - # Add another soundpack - soundpack.Fantastic = cataclysmDDA.buildSoundPack { - # ditto - }; + # Add another soundpack + soundpack.Fantastic = cataclysmDDA.buildSoundPack { + # ditto + }; - # Add another tileset - tileset.SuperDuper = cataclysmDDA.buildTileSet { - # ditto + # Add another tileset + tileset.SuperDuper = cataclysmDDA.buildTileSet { + # ditto + }; }; - }; in -cataclysm-dda.withMods (mods: with mods.extend customMods; [ - tileset.UndeadPeople - mod.Awesome - soundpack.Fantastic - tileset.SuperDuper -]) +cataclysm-dda.withMods ( + mods: with mods.extend customMods; [ + tileset.UndeadPeople + mod.Awesome + soundpack.Fantastic + tileset.SuperDuper + ] +) ``` diff --git a/doc/packages/citrix.section.md b/doc/packages/citrix.section.md index bcf0924249bc..9b680759f461 100644 --- a/doc/packages/citrix.section.md +++ b/doc/packages/citrix.section.md @@ -28,5 +28,6 @@ let ./custom-cert-1.pem ./custom-cert-2.pem # ... ]; -in citrix_workspace.override { inherit extraCerts; } +in +citrix_workspace.override { inherit extraCerts; } ``` diff --git a/doc/packages/darwin-builder.section.md b/doc/packages/darwin-builder.section.md index 06358c790165..fb71a78d6eb3 100644 --- a/doc/packages/darwin-builder.section.md +++ b/doc/packages/darwin-builder.section.md @@ -89,58 +89,72 @@ $ sudo launchctl kickstart -k system/org.nixos.nix-daemon darwin.inputs.nixpkgs.follows = "nixpkgs"; }; - outputs = { self, darwin, nixpkgs, ... }@inputs: - let + outputs = + { + self, + darwin, + nixpkgs, + ... + }@inputs: + let - inherit (darwin.lib) darwinSystem; - system = "aarch64-darwin"; - pkgs = nixpkgs.legacyPackages."${system}"; - linuxSystem = builtins.replaceStrings [ "darwin" ] [ "linux" ] system; + inherit (darwin.lib) darwinSystem; + system = "aarch64-darwin"; + pkgs = nixpkgs.legacyPackages."${system}"; + linuxSystem = builtins.replaceStrings [ "darwin" ] [ "linux" ] system; - darwin-builder = nixpkgs.lib.nixosSystem { - system = linuxSystem; - modules = [ - "${nixpkgs}/nixos/modules/profiles/nix-builder-vm.nix" - { virtualisation = { - host.pkgs = pkgs; - darwin-builder.workingDirectory = "/var/lib/darwin-builder"; - darwin-builder.hostPort = 22; - }; - } - ]; - }; - in { - - darwinConfigurations = { - machine1 = darwinSystem { - inherit system; + darwin-builder = nixpkgs.lib.nixosSystem { + system = linuxSystem; modules = [ + "${nixpkgs}/nixos/modules/profiles/nix-builder-vm.nix" { - nix.distributedBuilds = true; - nix.buildMachines = [{ - hostName = "localhost"; - sshUser = "builder"; - sshKey = "/etc/nix/builder_ed25519"; - system = linuxSystem; - maxJobs = 4; - supportedFeatures = [ "kvm" "benchmark" "big-parallel" ]; - }]; - - launchd.daemons.darwin-builder = { - command = "${darwin-builder.config.system.build.macos-builder-installer}/bin/create-builder"; - serviceConfig = { - KeepAlive = true; - RunAtLoad = true; - StandardOutPath = "/var/log/darwin-builder.log"; - StandardErrorPath = "/var/log/darwin-builder.log"; - }; + virtualisation = { + host.pkgs = pkgs; + darwin-builder.workingDirectory = "/var/lib/darwin-builder"; + darwin-builder.hostPort = 22; }; } ]; }; - }; + in + { - }; + darwinConfigurations = { + machine1 = darwinSystem { + inherit system; + modules = [ + { + nix.distributedBuilds = true; + nix.buildMachines = [ + { + hostName = "localhost"; + sshUser = "builder"; + sshKey = "/etc/nix/builder_ed25519"; + system = linuxSystem; + maxJobs = 4; + supportedFeatures = [ + "kvm" + "benchmark" + "big-parallel" + ]; + } + ]; + + launchd.daemons.darwin-builder = { + command = "${darwin-builder.config.system.build.macos-builder-installer}/bin/create-builder"; + serviceConfig = { + KeepAlive = true; + RunAtLoad = true; + StandardOutPath = "/var/log/darwin-builder.log"; + StandardErrorPath = "/var/log/darwin-builder.log"; + }; + }; + } + ]; + }; + }; + + }; } ``` @@ -154,21 +168,21 @@ To do this, you just need to set the `virtualisation.darwin-builder.*` parameter in the example below and rebuild. ```nix - { - darwin-builder = nixpkgs.lib.nixosSystem { - system = linuxSystem; - modules = [ - "${nixpkgs}/nixos/modules/profiles/nix-builder-vm.nix" - { - virtualisation.host.pkgs = pkgs; - virtualisation.darwin-builder.diskSize = 5120; - virtualisation.darwin-builder.memorySize = 1024; - virtualisation.darwin-builder.hostPort = 33022; - virtualisation.darwin-builder.workingDirectory = "/var/lib/darwin-builder"; - } - ]; - }; - } +{ + darwin-builder = nixpkgs.lib.nixosSystem { + system = linuxSystem; + modules = [ + "${nixpkgs}/nixos/modules/profiles/nix-builder-vm.nix" + { + virtualisation.host.pkgs = pkgs; + virtualisation.darwin-builder.diskSize = 5120; + virtualisation.darwin-builder.memorySize = 1024; + virtualisation.darwin-builder.hostPort = 33022; + virtualisation.darwin-builder.workingDirectory = "/var/lib/darwin-builder"; + } + ]; + }; +} ``` You may make any other changes to your VM in this attribute set. For example, diff --git a/doc/packages/eclipse.section.md b/doc/packages/eclipse.section.md index acf34b57571a..be554de6520b 100644 --- a/doc/packages/eclipse.section.md +++ b/doc/packages/eclipse.section.md @@ -15,11 +15,13 @@ If you prefer to install plugins in a more declarative manner, then Nixpkgs also ```nix { packageOverrides = pkgs: { - myEclipse = with pkgs.eclipses; eclipseWithPlugins { - eclipse = eclipse-platform; - jvmArgs = [ "-Xmx2048m" ]; - plugins = [ plugins.color-theme ]; - }; + myEclipse = + with pkgs.eclipses; + eclipseWithPlugins { + eclipse = eclipse-platform; + jvmArgs = [ "-Xmx2048m" ]; + plugins = [ plugins.color-theme ]; + }; }; } ``` @@ -37,32 +39,34 @@ Expanding the previous example with two plugins using the above functions, we ha ```nix { packageOverrides = pkgs: { - myEclipse = with pkgs.eclipses; eclipseWithPlugins { - eclipse = eclipse-platform; - jvmArgs = [ "-Xmx2048m" ]; - plugins = [ - plugins.color-theme - (plugins.buildEclipsePlugin { - name = "myplugin1-1.0"; - srcFeature = fetchurl { - url = "http://…/features/myplugin1.jar"; - hash = "sha256-123…"; - }; - srcPlugin = fetchurl { - url = "http://…/plugins/myplugin1.jar"; - hash = "sha256-123…"; - }; - }) - (plugins.buildEclipseUpdateSite { - name = "myplugin2-1.0"; - src = fetchurl { - stripRoot = false; - url = "http://…/myplugin2.zip"; - hash = "sha256-123…"; - }; - }) - ]; - }; + myEclipse = + with pkgs.eclipses; + eclipseWithPlugins { + eclipse = eclipse-platform; + jvmArgs = [ "-Xmx2048m" ]; + plugins = [ + plugins.color-theme + (plugins.buildEclipsePlugin { + name = "myplugin1-1.0"; + srcFeature = fetchurl { + url = "http://…/features/myplugin1.jar"; + hash = "sha256-123…"; + }; + srcPlugin = fetchurl { + url = "http://…/plugins/myplugin1.jar"; + hash = "sha256-123…"; + }; + }) + (plugins.buildEclipseUpdateSite { + name = "myplugin2-1.0"; + src = fetchurl { + stripRoot = false; + url = "http://…/myplugin2.zip"; + hash = "sha256-123…"; + }; + }) + ]; + }; }; } ``` diff --git a/doc/packages/emacs.section.md b/doc/packages/emacs.section.md index 2ced251f3e46..7d02a9389099 100644 --- a/doc/packages/emacs.section.md +++ b/doc/packages/emacs.section.md @@ -6,17 +6,21 @@ The Emacs package comes with some extra helpers to make it easier to configure. ```nix { - packageOverrides = pkgs: with pkgs; { - myEmacs = emacs.pkgs.withPackages (epkgs: (with epkgs.melpaStablePackages; [ - company - counsel - flycheck - ivy - magit - projectile - use-package - ])); - }; + packageOverrides = + pkgs: with pkgs; { + myEmacs = emacs.pkgs.withPackages ( + epkgs: + (with epkgs.melpaStablePackages; [ + company + counsel + flycheck + ivy + magit + projectile + use-package + ]) + ); + }; } ``` @@ -24,76 +28,80 @@ You can install it like any other packages via `nix-env -iA myEmacs`. However, t ```nix { - packageOverrides = pkgs: with pkgs; rec { - myEmacsConfig = writeText "default.el" '' - (eval-when-compile - (require 'use-package)) + packageOverrides = + pkgs: with pkgs; rec { + myEmacsConfig = writeText "default.el" '' + (eval-when-compile + (require 'use-package)) - ;; load some packages + ;; load some packages - (use-package company - :bind ("" . company-complete) - :diminish company-mode - :commands (company-mode global-company-mode) - :defer 1 - :config - (global-company-mode)) + (use-package company + :bind ("" . company-complete) + :diminish company-mode + :commands (company-mode global-company-mode) + :defer 1 + :config + (global-company-mode)) - (use-package counsel - :commands (counsel-descbinds) - :bind (([remap execute-extended-command] . counsel-M-x) - ("C-x C-f" . counsel-find-file) - ("C-c g" . counsel-git) - ("C-c j" . counsel-git-grep) - ("C-c k" . counsel-ag) - ("C-x l" . counsel-locate) - ("M-y" . counsel-yank-pop))) + (use-package counsel + :commands (counsel-descbinds) + :bind (([remap execute-extended-command] . counsel-M-x) + ("C-x C-f" . counsel-find-file) + ("C-c g" . counsel-git) + ("C-c j" . counsel-git-grep) + ("C-c k" . counsel-ag) + ("C-x l" . counsel-locate) + ("M-y" . counsel-yank-pop))) - (use-package flycheck - :defer 2 - :config (global-flycheck-mode)) + (use-package flycheck + :defer 2 + :config (global-flycheck-mode)) - (use-package ivy - :defer 1 - :bind (("C-c C-r" . ivy-resume) - ("C-x C-b" . ivy-switch-buffer) - :map ivy-minibuffer-map - ("C-j" . ivy-call)) - :diminish ivy-mode - :commands ivy-mode - :config - (ivy-mode 1)) + (use-package ivy + :defer 1 + :bind (("C-c C-r" . ivy-resume) + ("C-x C-b" . ivy-switch-buffer) + :map ivy-minibuffer-map + ("C-j" . ivy-call)) + :diminish ivy-mode + :commands ivy-mode + :config + (ivy-mode 1)) - (use-package magit - :defer - :if (executable-find "git") - :bind (("C-x g" . magit-status) - ("C-x G" . magit-dispatch-popup)) - :init - (setq magit-completing-read-function 'ivy-completing-read)) + (use-package magit + :defer + :if (executable-find "git") + :bind (("C-x g" . magit-status) + ("C-x G" . magit-dispatch-popup)) + :init + (setq magit-completing-read-function 'ivy-completing-read)) - (use-package projectile - :commands projectile-mode - :bind-keymap ("C-c p" . projectile-command-map) - :defer 5 - :config - (projectile-global-mode)) - ''; + (use-package projectile + :commands projectile-mode + :bind-keymap ("C-c p" . projectile-command-map) + :defer 5 + :config + (projectile-global-mode)) + ''; - myEmacs = emacs.pkgs.withPackages (epkgs: (with epkgs.melpaStablePackages; [ - (runCommand "default.el" {} '' - mkdir -p $out/share/emacs/site-lisp - cp ${myEmacsConfig} $out/share/emacs/site-lisp/default.el - '') - company - counsel - flycheck - ivy - magit - projectile - use-package - ])); - }; + myEmacs = emacs.pkgs.withPackages ( + epkgs: + (with epkgs.melpaStablePackages; [ + (runCommand "default.el" { } '' + mkdir -p $out/share/emacs/site-lisp + cp ${myEmacsConfig} $out/share/emacs/site-lisp/default.el + '') + company + counsel + flycheck + ivy + magit + projectile + use-package + ]) + ); + }; } ``` @@ -108,11 +116,12 @@ let # ... }; in -((emacsPackagesFor emacs).overrideScope overrides).withPackages - (p: with p; [ +((emacsPackagesFor emacs).overrideScope overrides).withPackages ( + p: with p; [ # here both these package will use haskell-mode of our own choice ghc-mod dante - ]) + ] +) ``` } diff --git a/doc/packages/fish.section.md b/doc/packages/fish.section.md index 85b57acd1090..510d406b1ba1 100644 --- a/doc/packages/fish.section.md +++ b/doc/packages/fish.section.md @@ -42,9 +42,12 @@ way to test Fish plugins and scripts without having to alter the environment. ```nix wrapFish { - pluginPkgs = with fishPlugins; [ pure foreign-env ]; - completionDirs = []; - functionDirs = []; + pluginPkgs = with fishPlugins; [ + pure + foreign-env + ]; + completionDirs = [ ]; + functionDirs = [ ]; confDirs = [ "/path/to/some/fish/init/dir/" ]; } ``` diff --git a/doc/packages/ibus.section.md b/doc/packages/ibus.section.md index 0e379723da12..4f298db35943 100644 --- a/doc/packages/ibus.section.md +++ b/doc/packages/ibus.section.md @@ -9,7 +9,8 @@ IBus needs to be configured accordingly to activate `typing-booster`. The config On NixOS, you need to explicitly enable `ibus` with given engines before customizing your desktop to use `typing-booster`. This can be achieved using the `ibus` module: ```nix -{ pkgs, ... }: { +{ pkgs, ... }: +{ i18n.inputMethod = { enable = true; type = "ibus"; @@ -23,7 +24,12 @@ On NixOS, you need to explicitly enable `ibus` with given engines before customi The IBus engine is based on `hunspell` to support completion in many languages. By default, the dictionaries `de-de`, `en-us`, `fr-moderne` `es-es`, `it-it`, `sv-se` and `sv-fi` are in use. To add another dictionary, the package can be overridden like this: ```nix -ibus-engines.typing-booster.override { langs = [ "de-at" "en-gb" ]; } +ibus-engines.typing-booster.override { + langs = [ + "de-at" + "en-gb" + ]; +} ``` _Note: each language passed to `langs` must be an attribute name in `pkgs.hunspellDicts`._ @@ -35,7 +41,8 @@ The `ibus-engines.typing-booster` package contains a program named `emoji-picker On NixOS, it can be installed using the following expression: ```nix -{ pkgs, ... }: { +{ pkgs, ... }: +{ fonts.packages = with pkgs; [ noto-fonts-color-emoji ]; } ``` diff --git a/doc/packages/krita.section.md b/doc/packages/krita.section.md index ba427bd62ba1..f81068d73211 100644 --- a/doc/packages/krita.section.md +++ b/doc/packages/krita.section.md @@ -23,7 +23,7 @@ list of previous plugins via `pkgs.krita.binaryPlugins`: ```nix (pkgs.krita.override (old: { - binaryPlugins = old.binaryPlugins ++ [ your-plugin ]; + binaryPlugins = old.binaryPlugins ++ [ your-plugin ]; })) ``` diff --git a/doc/packages/python-tree-sitter.section.md b/doc/packages/python-tree-sitter.section.md index e314e4f18f15..6ccaa31a6283 100644 --- a/doc/packages/python-tree-sitter.section.md +++ b/doc/packages/python-tree-sitter.section.md @@ -7,16 +7,20 @@ Python bindings for Tree Sitter grammars are provided through the [py-tree-sitte For example, to experiment with the Rust grammar, you can create a shell environment with the following configuration: ```nix -{ pkgs ? {} }: +{ + pkgs ? { }, +}: pkgs.mkShell { name = "py-tree-sitter-dev-shell"; buildInputs = with pkgs; [ - (python3.withPackages (ps: with ps; [ - tree-sitter - tree-sitter-grammars.tree-sitter-rust - ])) + (python3.withPackages ( + ps: with ps; [ + tree-sitter + tree-sitter-grammars.tree-sitter-rust + ] + )) ]; } ``` diff --git a/doc/packages/urxvt.section.md b/doc/packages/urxvt.section.md index 1d40c92ed73f..e31f0756eb19 100644 --- a/doc/packages/urxvt.section.md +++ b/doc/packages/urxvt.section.md @@ -8,9 +8,15 @@ In `nixpkgs`, urxvt is provided by the package `rxvt-unicode`. It can be configu ```nix rxvt-unicode.override { - configure = { availablePlugins, ... }: { - plugins = with availablePlugins; [ perls resize-font vtwheel ]; - }; + configure = + { availablePlugins, ... }: + { + plugins = with availablePlugins; [ + perls + resize-font + vtwheel + ]; + }; } ``` @@ -20,9 +26,11 @@ In order to add plugins but also keep all default plugins installed, it is possi ```nix rxvt-unicode.override { - configure = { availablePlugins, ... }: { - plugins = (builtins.attrValues availablePlugins) ++ [ custom-plugin ]; - }; + configure = + { availablePlugins, ... }: + { + plugins = (builtins.attrValues availablePlugins) ++ [ custom-plugin ]; + }; } ``` @@ -40,9 +48,11 @@ In addition to `plugins` the options `extraDeps` and `perlDeps` can be used to i ```nix rxvt-unicode.override { - configure = { availablePlugins, ... }: { - pluginsDeps = [ xsel ]; - }; + configure = + { availablePlugins, ... }: + { + pluginsDeps = [ xsel ]; + }; } ``` @@ -50,9 +60,11 @@ rxvt-unicode.override { ```nix rxvt-unicode.override { - configure = { availablePlugins, ... }: { - perlDeps = with perlPackages; [ AnyEvent ]; - }; + configure = + { availablePlugins, ... }: + { + perlDeps = with perlPackages; [ AnyEvent ]; + }; } ``` diff --git a/doc/packages/weechat.section.md b/doc/packages/weechat.section.md index 295397f476b0..f175547de825 100644 --- a/doc/packages/weechat.section.md +++ b/doc/packages/weechat.section.md @@ -3,9 +3,16 @@ WeeChat can be configured to include your choice of plugins, reducing its closure size from the default configuration which includes all available plugins. To make use of this functionality, install an expression that overrides its configuration, such as: ```nix -weechat.override {configure = ({availablePlugins, ...}: { - plugins = with availablePlugins; [ python perl ]; - }); +weechat.override { + configure = ( + { availablePlugins, ... }: + { + plugins = with availablePlugins; [ + python + perl + ]; + } + ); } ``` @@ -16,10 +23,18 @@ The plugins currently available are `python`, `perl`, `ruby`, `guile`, `tcl` and The Python and Perl plugins allows the addition of extra libraries. For instance, the `inotify.py` script in `weechat-scripts` requires D-Bus or libnotify, and the `fish.py` script requires `pycrypto`. To use these scripts, use the plugin's `withPackages` attribute: ```nix -weechat.override { configure = {availablePlugins, ...}: { - plugins = with availablePlugins; [ - (python.withPackages (ps: with ps; [ pycrypto python-dbus ])) - ]; +weechat.override { + configure = + { availablePlugins, ... }: + { + plugins = with availablePlugins; [ + (python.withPackages ( + ps: with ps; [ + pycrypto + python-dbus + ] + )) + ]; }; } ``` @@ -27,23 +42,37 @@ weechat.override { configure = {availablePlugins, ...}: { In order to also keep all default plugins installed, it is possible to use the following method: ```nix -weechat.override { configure = { availablePlugins, ... }: { - plugins = builtins.attrValues (availablePlugins // { - python = availablePlugins.python.withPackages (ps: with ps; [ pycrypto python-dbus ]); - }); -}; } +weechat.override { + configure = + { availablePlugins, ... }: + { + plugins = builtins.attrValues ( + availablePlugins + // { + python = availablePlugins.python.withPackages ( + ps: with ps; [ + pycrypto + python-dbus + ] + ); + } + ); + }; +} ``` WeeChat allows to set defaults on startup using the `--run-command`. The `configure` method can be used to pass commands to the program: ```nix weechat.override { - configure = { availablePlugins, ... }: { - init = '' - /set foo bar - /server add libera irc.libera.chat - ''; - }; + configure = + { availablePlugins, ... }: + { + init = '' + /set foo bar + /server add libera irc.libera.chat + ''; + }; } ``` @@ -53,14 +82,18 @@ Additionally, it's possible to specify scripts to be loaded when starting `weech ```nix weechat.override { - configure = { availablePlugins, ... }: { - scripts = with pkgs.weechatScripts; [ - weechat-xmpp weechat-matrix-bridge wee-slack - ]; - init = '' - /set plugins.var.python.jabber.key "val" - ''; - }; + configure = + { availablePlugins, ... }: + { + scripts = with pkgs.weechatScripts; [ + weechat-xmpp + weechat-matrix-bridge + wee-slack + ]; + init = '' + /set plugins.var.python.jabber.key "val" + ''; + }; } ``` @@ -75,7 +108,10 @@ stdenv.mkDerivation { url = "https://scripts.tld/your-scripts.tar.gz"; hash = "..."; }; - passthru.scripts = [ "foo.py" "bar.lua" ]; + passthru.scripts = [ + "foo.py" + "bar.lua" + ]; installPhase = '' mkdir $out/share cp foo.py $out/share diff --git a/doc/redirects.json b/doc/redirects.json index 15cb82504393..4925709c92c6 100644 --- a/doc/redirects.json +++ b/doc/redirects.json @@ -2067,6 +2067,9 @@ "setup-hook-automake": [ "index.html#setup-hook-automake" ], + "setup-hook-autopatchcilhook": [ + "index.html#setup-hook-autopatchcilhook" + ], "setup-hook-autopatchelfhook": [ "index.html#setup-hook-autopatchelfhook" ], diff --git a/doc/release-notes/rl-2505.section.md b/doc/release-notes/rl-2505.section.md index 1220db3ad89f..015f17ced655 100644 --- a/doc/release-notes/rl-2505.section.md +++ b/doc/release-notes/rl-2505.section.md @@ -71,6 +71,8 @@ - [testers.shellcheck](https://nixos.org/manual/nixpkgs/unstable/#tester-shellcheck) now warns when `name` is not provided. The `name` argument will become mandatory in a future release. +- [GIMP 3.0](https://www.gimp.org/news/2025/03/16/gimp-3-0-released/) available as `gimp3`. + - `grafana-agent` and `services.grafana-agent` have been removed in favor of Grafana Alloy (`grafana-alloy` and `services.alloy`), as they depend on an EOL compiler version and will become EOL during the 25.05 lifecycle. diff --git a/doc/stdenv/cross-compilation.chapter.md b/doc/stdenv/cross-compilation.chapter.md index b06a8ab93a70..e115d9d103ae 100644 --- a/doc/stdenv/cross-compilation.chapter.md +++ b/doc/stdenv/cross-compilation.chapter.md @@ -15,7 +15,13 @@ Nixpkgs follows the [conventions of GNU autoconf](https://gcc.gnu.org/onlinedocs In Nixpkgs, these three platforms are defined as attribute sets under the names `buildPlatform`, `hostPlatform`, and `targetPlatform`. They are always defined as attributes in the standard environment. That means one can access them like: ```nix -{ stdenv, fooDep, barDep, ... }: { +{ + stdenv, + fooDep, + barDep, + ... +}: +{ # ...stdenv.buildPlatform... } ``` @@ -169,11 +175,13 @@ e.g. ```nix { - nativeBuildInputs = [ - meson - ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ - mesonEmulatorHook - ]; + nativeBuildInputs = + [ + meson + ] + ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ + mesonEmulatorHook + ]; } ``` diff --git a/doc/stdenv/meta.chapter.md b/doc/stdenv/meta.chapter.md index ddd5eb45441a..2e29c75e7a99 100644 --- a/doc/stdenv/meta.chapter.md +++ b/doc/stdenv/meta.chapter.md @@ -145,7 +145,7 @@ The list of Nix platform types for which the [Hydra](https://github.com/nixos/hy ```nix { meta.platforms = lib.platforms.linux; - meta.hydraPlatforms = []; + meta.hydraPlatforms = [ ]; } ``` @@ -169,7 +169,12 @@ This means that `broken` can be used to express constraints, for example: ```nix { - meta.broken = lib.all (map (p: p.meta.broken) [ glibc musl ]); + meta.broken = lib.all ( + map (p: p.meta.broken) [ + glibc + musl + ] + ); } ``` diff --git a/doc/stdenv/multiple-output.chapter.md b/doc/stdenv/multiple-output.chapter.md index 09fdba01c44a..9140f5a952b7 100644 --- a/doc/stdenv/multiple-output.chapter.md +++ b/doc/stdenv/multiple-output.chapter.md @@ -31,7 +31,12 @@ In nixpkgs there is a framework supporting multiple-output derivations. It tries ```nix { - outputs = [ "bin" "dev" "out" "doc" ]; + outputs = [ + "bin" + "dev" + "out" + "doc" + ]; } ``` diff --git a/doc/stdenv/passthru.chapter.md b/doc/stdenv/passthru.chapter.md index 0c0b03fd0dc2..db40d4bbe054 100644 --- a/doc/stdenv/passthru.chapter.md +++ b/doc/stdenv/passthru.chapter.md @@ -18,7 +18,9 @@ Its value can be accessed as if it was set inside a derivation. let hello = stdenv.mkDerivation { pname = "hello"; - src = fetchGit { /* ... */ }; + src = fetchGit { + # ... + }; passthru = { foo = "bar"; diff --git a/doc/stdenv/stdenv.chapter.md b/doc/stdenv/stdenv.chapter.md index b3bbab57eed2..30d8f5da7e39 100644 --- a/doc/stdenv/stdenv.chapter.md +++ b/doc/stdenv/stdenv.chapter.md @@ -37,7 +37,11 @@ stdenv.mkDerivation { pname = "libfoo"; version = "1.2.3"; # ... - buildInputs = [libbar perl ncurses]; + buildInputs = [ + libbar + perl + ncurses + ]; } ``` @@ -217,7 +221,10 @@ stdenv.mkDerivation rec { hash = "sha256-viwrS9lnaU8sTGuzK/+L/PlMM/xRRtgVuK5pixVeDEw="; }; - nativeBuildInputs = [ makeWrapper pkg-config ]; + nativeBuildInputs = [ + makeWrapper + pkg-config + ]; buildInputs = [ libseccomp ]; postInstall = '' @@ -227,12 +234,22 @@ stdenv.mkDerivation rec { --replace-fail "cp " "cp --no-preserve=mode " wrapProgram $out/bin/solo5-virtio-mkimage \ - --prefix PATH : ${lib.makeBinPath [ dosfstools mtools parted syslinux ]} + --prefix PATH : ${ + lib.makeBinPath [ + dosfstools + mtools + parted + syslinux + ] + } ''; doCheck = true; - nativeCheckInputs = [ util-linux qemu ]; - checkPhase = '' [elided] ''; + nativeCheckInputs = [ + util-linux + qemu + ]; + checkPhase = ''[elided] ''; } ``` @@ -272,7 +289,7 @@ This can lead to conflicting dependencies that cannot easily be resolved. # A propagated dependency ```nix -with import {}; +with import { }; let bar = stdenv.mkDerivation { name = "bar"; @@ -442,8 +459,7 @@ If you pass a function to `mkDerivation`, it will receive as its argument the fi mkDerivation (finalAttrs: { pname = "hello"; withFeature = true; - configureFlags = - lib.optionals finalAttrs.withFeature ["--with-feature"]; + configureFlags = lib.optionals finalAttrs.withFeature [ "--with-feature" ]; }) ``` @@ -460,28 +476,32 @@ various bindings: ```nix # `pkg` is the _original_ definition (for illustration purposes) -let pkg = - mkDerivation (finalAttrs: { +let + pkg = mkDerivation (finalAttrs: { # ... # An example attribute - packages = []; + packages = [ ]; # `passthru.tests` is a commonly defined attribute. passthru.tests.simple = f finalAttrs.finalPackage; # An example of an attribute containing a function - passthru.appendPackages = packages': - finalAttrs.finalPackage.overrideAttrs (newSelf: super: { - packages = super.packages ++ packages'; - }); + passthru.appendPackages = + packages': + finalAttrs.finalPackage.overrideAttrs ( + newSelf: super: { + packages = super.packages ++ packages'; + } + ); # For illustration purposes; referenced as # `(pkg.overrideAttrs(x)).finalAttrs` etc in the text below. passthru.finalAttrs = finalAttrs; passthru.original = pkg; }); -in pkg +in +pkg ``` Unlike the `pkg` binding in the above example, the `finalAttrs` parameter always references the final attributes. For instance `(pkg.overrideAttrs(x)).finalAttrs.finalPackage` is identical to `pkg.overrideAttrs(x)`, whereas `(pkg.overrideAttrs(x)).original` is the same as the original `pkg`. @@ -955,7 +975,7 @@ To make GDB find debug information for the `socat` package and its dependencies, ```nix let pkgs = import ./. { - config = {}; + config = { }; overlays = [ (final: prev: { ncurses = prev.ncurses.overrideAttrs { separateDebugInfo = true; }; @@ -974,19 +994,19 @@ let ]; }; in - pkgs.mkShell { +pkgs.mkShell { - NIX_DEBUG_INFO_DIRS = "${pkgs.lib.getLib myDebugInfoDirs}/lib/debug"; + NIX_DEBUG_INFO_DIRS = "${pkgs.lib.getLib myDebugInfoDirs}/lib/debug"; - packages = [ - pkgs.gdb - pkgs.socat - ]; + packages = [ + pkgs.gdb + pkgs.socat + ]; - shellHook = '' - ${pkgs.lib.getBin pkgs.gdb}/bin/gdb ${pkgs.lib.getBin pkgs.socat}/bin/socat - ''; - } + shellHook = '' + ${pkgs.lib.getBin pkgs.gdb}/bin/gdb ${pkgs.lib.getBin pkgs.socat}/bin/socat + ''; +} ``` This setup works as follows: diff --git a/doc/tests/check-nix-code-blocks.nix b/doc/tests/check-nix-code-blocks.nix new file mode 100644 index 000000000000..5ec934f6bba8 --- /dev/null +++ b/doc/tests/check-nix-code-blocks.nix @@ -0,0 +1,32 @@ +{ + runCommand, + markdown-code-runner, + nixfmt-rfc-style, +}: + +runCommand "manual_check-nix-code-blocks" + { + nativeBuildInputs = [ + markdown-code-runner + nixfmt-rfc-style + ]; + } + '' + set +e + + mdcr --check --config ${./mdcr-config.toml} ${./..} + + if [ $? -ne 0 ]; then + cat < ```nix -import pkgs.path { overlays = [ (self: super: { - foo = super.foo.override { barSupport = true ; }; - })];} +import pkgs.path { + overlays = [ + (self: super: { + foo = super.foo.override { barSupport = true; }; + }) + ]; +} ``` ```nix { mypkg = pkgs.callPackage ./mypkg.nix { - mydep = pkgs.mydep.override { /* ... */ }; + mydep = pkgs.mydep.override { + # ... + }; }; } ``` @@ -55,9 +66,11 @@ Example usages: ```nix { - helloBar = pkgs.hello.overrideAttrs (finalAttrs: previousAttrs: { - pname = previousAttrs.pname + "-bar"; - }); + helloBar = pkgs.hello.overrideAttrs ( + finalAttrs: previousAttrs: { + pname = previousAttrs.pname + "-bar"; + } + ); } ``` @@ -107,7 +120,7 @@ Example usage: url = "ftp://alpha.gnu.org/gnu/sed/sed-4.2.2-pre.tar.bz2"; hash = "sha256-MxBJRcM2rYzQYwJ5XKxhXTQByvSg5jZc5cSHEZoB2IY="; }; - patches = []; + patches = [ ]; }); } ``` @@ -128,8 +141,15 @@ Example usage: ```nix { - f = { a, b }: { result = a+b; }; - c = lib.makeOverridable f { a = 1; b = 2; }; + f = + { a, b }: + { + result = a + b; + }; + c = lib.makeOverridable f { + a = 1; + b = 2; + }; } ``` diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index b1c0fc28f5dd..ea5c577b3a6d 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -5020,6 +5020,12 @@ githubId = 6470493; name = "Craige McWhirter"; }; + craigf = { + email = "craig@craigfurman.dev"; + github = "craigfurman"; + githubId = 4772216; + name = "Craig Furman"; + }; cransom = { email = "cransom@hubns.net"; github = "cransom"; @@ -24473,6 +24479,12 @@ githubId = 6118602; name = "Viktor"; }; + tmssngr = { + email = "nixpkgs@syntevo.com"; + github = "tmssngr"; + githubId = 6029561; + name = "Thomas Singer"; + }; tne = { email = "tne@garudalinux.org"; github = "JustTNE"; diff --git a/maintainers/scripts/luarocks-packages.csv b/maintainers/scripts/luarocks-packages.csv index 72f1fb1f9a44..bb23782e27d5 100644 --- a/maintainers/scripts/luarocks-packages.csv +++ b/maintainers/scripts/luarocks-packages.csv @@ -4,7 +4,7 @@ ansicolors,,,,,,Freed-Wu argparse,,,,,, basexx,,,,,, binaryheap,,,,,,vcunat -bit32,,,,5.3.0-1,5.1,lblasc +bit32,,,,,5.1,lblasc busted,,,,,, busted-htest,,,,,,mrcjkb cassowary,,,,,,alerque diff --git a/nixos/doc/manual/release-notes/rl-2505.section.md b/nixos/doc/manual/release-notes/rl-2505.section.md index 3978772d32d8..470c81ab9794 100644 --- a/nixos/doc/manual/release-notes/rl-2505.section.md +++ b/nixos/doc/manual/release-notes/rl-2505.section.md @@ -416,6 +416,8 @@ - `programs.clash-verge.tunMode` was deprecated and removed because now service mode is necessary to start program. Without `programs.clash-verge.enable`, clash-verge-rev will refuse to start. +- `services.homepage-dashboard` now requires the `allowedHosts` option to be set in accordance with the [documentation](https://gethomepage.dev/installation/#homepage_allowed_hosts). + - `services.netbird.tunnels` was renamed to [`services.netbird.clients`](#opt-services.netbird.clients), hardened (using dedicated less-privileged users) and significantly extended. diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 238f42652849..1f1317ddcdfe 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -1055,6 +1055,8 @@ ./services/networking/atticd.nix ./services/networking/autossh.nix ./services/networking/avahi-daemon.nix + ./services/networking/ax25/axlisten.nix + ./services/networking/ax25/axports.nix ./services/networking/babeld.nix ./services/networking/bee.nix ./services/networking/biboumi.nix diff --git a/nixos/modules/services/backup/restic-rest-server.nix b/nixos/modules/services/backup/restic-rest-server.nix index 5850b17e9cb7..2f82c406c415 100644 --- a/nixos/modules/services/backup/restic-rest-server.nix +++ b/nixos/modules/services/backup/restic-rest-server.nix @@ -36,6 +36,12 @@ in ''; }; + htpasswd-file = lib.mkOption { + default = null; + type = lib.types.nullOr lib.types.path; + description = "The path to the servers .htpasswd file. Defaults to {dataDir}/htpasswd."; + }; + privateRepos = lib.mkOption { default = false; type = lib.types.bool; @@ -84,6 +90,7 @@ in ExecStart = '' ${cfg.package}/bin/rest-server \ --path ${cfg.dataDir} \ + --htpasswd-file ${cfg.htpasswd-file} \ ${lib.optionalString cfg.appendOnly "--append-only"} \ ${lib.optionalString cfg.privateRepos "--private-repos"} \ ${lib.optionalString cfg.prometheus "--prometheus"} \ @@ -112,6 +119,7 @@ in ProtectControlGroups = true; PrivateDevices = true; ReadWritePaths = [ cfg.dataDir ]; + ReadOnlyPaths = [ cfg.htpasswd-file ]; RemoveIPC = true; RestrictAddressFamilies = "none"; RestrictNamespaces = true; diff --git a/nixos/modules/services/matrix/mautrix-signal.nix b/nixos/modules/services/matrix/mautrix-signal.nix index 9977011e0035..4695d7c7423c 100644 --- a/nixos/modules/services/matrix/mautrix-signal.nix +++ b/nixos/modules/services/matrix/mautrix-signal.nix @@ -268,7 +268,7 @@ in buildDocsInSandbox = false; doc = ./mautrix-signal.md; maintainers = with lib.maintainers; [ - niklaskorz + alyaeanyx frederictobiasc ]; }; diff --git a/nixos/modules/services/misc/homepage-dashboard.nix b/nixos/modules/services/misc/homepage-dashboard.nix index 72861fdbbe87..1a541963187b 100644 --- a/nixos/modules/services/misc/homepage-dashboard.nix +++ b/nixos/modules/services/misc/homepage-dashboard.nix @@ -4,7 +4,6 @@ lib, ... }: - let cfg = config.services.homepage-dashboard; # Define the settings format used for this program @@ -29,6 +28,19 @@ in description = "Port for Homepage to bind to."; }; + allowedHosts = lib.mkOption { + type = lib.types.str; + default = "localhost:8082,127.0.0.1:8082"; + example = "example.com"; + description = '' + Hosts that homepage-dashboard will be running under. + You will want to change this in order to acess homepage from anything other than localhost. + see the upsream documentation: + + + ''; + }; + environmentFile = lib.mkOption { type = lib.types.str; description = '' @@ -215,6 +227,7 @@ in NIXPKGS_HOMEPAGE_CACHE_DIR = "/var/cache/homepage-dashboard"; PORT = toString cfg.listenPort; LOG_TARGETS = "stdout"; + HOMEPAGE_ALLOWED_HOSTS = cfg.allowedHosts; }; serviceConfig = { diff --git a/nixos/modules/services/networking/ax25/axlisten.nix b/nixos/modules/services/networking/ax25/axlisten.nix new file mode 100644 index 000000000000..ad887885c142 --- /dev/null +++ b/nixos/modules/services/networking/ax25/axlisten.nix @@ -0,0 +1,62 @@ +{ + config, + lib, + pkgs, + ... +}: + +let + inherit (lib) + types + ; + + inherit (lib.modules) + mkIf + ; + + inherit (lib.options) + mkEnableOption + mkOption + literalExpression + ; + + cfg = config.services.ax25.axlisten; +in +{ + options = { + + services.ax25.axlisten = { + + enable = mkEnableOption "AX.25 axlisten daemon"; + + package = mkOption { + type = types.package; + default = pkgs.ax25-apps; + defaultText = literalExpression "pkgs.ax25-apps"; + description = "The ax25-apps package to use."; + }; + + config = mkOption { + type = types.str; + default = "-art"; + description = '' + Options that will be passed to the axlisten daemon. + ''; + }; + }; + }; + + config = mkIf cfg.enable { + + systemd.services.axlisten = { + description = "AX.25 traffic monitor"; + wantedBy = [ "multi-user.target" ]; + after = [ "ax25-axports.target" ]; + requires = [ "ax25-axports.target" ]; + serviceConfig = { + Type = "exec"; + ExecStart = "${cfg.package}/bin/axlisten ${cfg.config}"; + }; + }; + }; +} diff --git a/nixos/modules/services/networking/ax25/axports.nix b/nixos/modules/services/networking/ax25/axports.nix new file mode 100644 index 000000000000..257d7ee8c1c5 --- /dev/null +++ b/nixos/modules/services/networking/ax25/axports.nix @@ -0,0 +1,149 @@ +{ + config, + lib, + pkgs, + ... +}: + +let + inherit (lib) + types + ; + + inherit (lib.strings) + concatStringsSep + optionalString + ; + + inherit (lib.attrsets) + filterAttrs + mapAttrsToList + mapAttrs' + ; + + inherit (lib.modules) + mkIf + ; + + inherit (lib.options) + mkEnableOption + mkOption + mkPackageOption + ; + + cfg = config.services.ax25.axports; + + enabledAxports = filterAttrs (ax25Name: cfg: cfg.enable) cfg; + + axportsOpts = { + + options = { + enable = mkEnableOption "Enables the axport interface"; + + package = mkPackageOption pkgs "ax25-tools" { }; + + tty = mkOption { + type = types.str; + example = "/dev/ttyACM0"; + description = '' + Location of hardware kiss tnc for this interface. + ''; + }; + + callsign = mkOption { + type = types.str; + example = "WB6WLV-7"; + description = '' + The callsign of the physical interface to bind to. + ''; + }; + + description = mkOption { + type = types.str; + # This cannot be empty since some ax25 tools cant parse /etc/ax25/axports without it + default = "NixOS managed tnc"; + description = '' + Free format description of this interface. + ''; + }; + + baud = mkOption { + type = types.int; + example = 57600; + description = '' + The serial port speed of this interface. + ''; + }; + + paclen = mkOption { + type = types.int; + default = 255; + description = '' + Default maximum packet size for this interface. + ''; + }; + + window = mkOption { + type = types.int; + default = 7; + description = '' + Default window size for this interface. + ''; + }; + + kissParams = mkOption { + type = types.nullOr types.str; + default = null; + example = "-t 300 -l 10 -s 12 -r 80 -f n"; + description = '' + Kissattach parameters for this interface. + ''; + }; + }; + }; +in +{ + + options = { + + services.ax25.axports = mkOption { + type = types.attrsOf (types.submodule axportsOpts); + default = { }; + description = "Specification of one or more AX.25 ports."; + }; + }; + + config = mkIf (enabledAxports != { }) { + + environment.etc."ax25/axports" = { + text = concatStringsSep "\n" ( + mapAttrsToList ( + portName: portCfg: + "${portName} ${portCfg.callsign} ${toString portCfg.baud} ${toString portCfg.paclen} ${toString portCfg.window} ${portCfg.description}" + ) enabledAxports + ); + mode = "0644"; + }; + + systemd.targets.ax25-axports = { + description = "AX.25 axports group target"; + }; + + systemd.services = mapAttrs' (portName: portCfg: { + name = "ax25-kissattach-${portName}"; + value = { + description = "AX.25 KISS attached interface for ${portName}"; + wantedBy = [ "multi-user.target" ]; + before = [ "ax25-axports.target" ]; + partOf = [ "ax25-axports.target" ]; + serviceConfig = { + Type = "exec"; + ExecStart = "${portCfg.package}/bin/kissattach ${portCfg.tty} ${portName}"; + }; + postStart = optionalString (portCfg.kissParams != null) '' + ${portCfg.package}/bin/kissparms -p ${portName} ${portCfg.kissParams} + ''; + }; + }) enabledAxports; + }; +} diff --git a/nixos/modules/services/search/meilisearch.nix b/nixos/modules/services/search/meilisearch.nix index 1a1465b8e222..03b581c4d8cd 100644 --- a/nixos/modules/services/search/meilisearch.nix +++ b/nixos/modules/services/search/meilisearch.nix @@ -108,6 +108,21 @@ in type = lib.types.str; }; + # TODO: turn on by default when it stops being experimental + dumplessUpgrade = lib.mkOption { + default = false; + example = true; + description = '' + Whether to enable (experimental) dumpless upgrade. + + Allows upgrading from Meilisearch >=v1.12 to Meilisearch >=v1.13 without manually + dumping and importing the database. + + More information at https://www.meilisearch.com/docs/learn/update_and_migration/updating#dumpless-upgrade + ''; + type = lib.types.bool; + }; + }; ###### implementation @@ -129,6 +144,7 @@ in MEILI_DUMP_DIR = "/var/lib/meilisearch/dumps"; MEILI_LOG_LEVEL = cfg.logLevel; MEILI_MAX_INDEX_SIZE = cfg.maxIndexSize; + MEILI_EXPERIMENTAL_DUMPLESS_UPGRADE = lib.boolToString cfg.dumplessUpgrade; }; serviceConfig = { ExecStart = "${cfg.package}/bin/meilisearch"; diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 8e83095a7ded..9e36dc9e4f89 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -213,6 +213,7 @@ in atop = import ./atop.nix { inherit pkgs runTest; }; atticd = runTest ./atticd.nix; atuin = runTest ./atuin.nix; + ax25 = handleTest ./ax25.nix { }; audiobookshelf = runTest ./audiobookshelf.nix; auth-mysql = runTest ./auth-mysql.nix; authelia = runTest ./authelia.nix; @@ -768,7 +769,7 @@ in mailcatcher = runTest ./mailcatcher.nix; mailhog = handleTest ./mailhog.nix { }; mailpit = runTest ./mailpit.nix; - mailman = handleTest ./mailman.nix { }; + mailman = runTest ./mailman.nix; man = handleTest ./man.nix { }; mariadb-galera = handleTest ./mysql/mariadb-galera.nix { }; marytts = handleTest ./marytts.nix { }; @@ -791,7 +792,7 @@ in mediatomb = handleTest ./mediatomb.nix { }; mediawiki = handleTest ./mediawiki.nix { }; meilisearch = handleTest ./meilisearch.nix { }; - memcached = handleTest ./memcached.nix { }; + memcached = runTest ./memcached.nix; merecat = handleTest ./merecat.nix { }; metabase = handleTest ./metabase.nix { }; mihomo = handleTest ./mihomo.nix { }; @@ -885,7 +886,7 @@ in # TODO: put in networking.nix after the test becomes more complete networkingProxy = handleTest ./networking-proxy.nix { }; nextcloud = handleTest ./nextcloud { }; - nextflow = handleTestOn [ "x86_64-linux" ] ./nextflow.nix { }; + nextflow = runTestOn [ "x86_64-linux" ] ./nextflow.nix; nextjs-ollama-llm-ui = runTest ./web-apps/nextjs-ollama-llm-ui.nix; nexus = handleTest ./nexus.nix { }; # TODO: Test nfsv3 + Kerberos @@ -1233,7 +1234,7 @@ in stargazer = runTest ./web-servers/stargazer.nix; starship = runTest ./starship.nix; stash = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./stash.nix { }; - static-web-server = handleTest ./web-servers/static-web-server.nix { }; + static-web-server = runTest ./web-servers/static-web-server.nix; step-ca = handleTestOn [ "x86_64-linux" ] ./step-ca.nix { }; stratis = handleTest ./stratis { }; strongswan-swanctl = handleTest ./strongswan-swanctl.nix { }; diff --git a/nixos/tests/ax25.nix b/nixos/tests/ax25.nix new file mode 100644 index 000000000000..f1092d5de101 --- /dev/null +++ b/nixos/tests/ax25.nix @@ -0,0 +1,131 @@ +import ./make-test-python.nix ( + { pkgs, lib, ... }: + let + + baud = 57600; + tty = "/dev/ttyACM0"; + port = "tnc0"; + socatPort = 1234; + + createAX25Node = nodeId: { + + boot.kernelPackages = pkgs.linuxPackages_ham; + boot.kernelModules = [ "ax25" ]; + + networking.firewall.allowedTCPPorts = [ socatPort ]; + + environment.systemPackages = with pkgs; [ + libax25 + ax25-tools + ax25-apps + socat + ]; + + services.ax25.axports."${port}" = { + inherit baud tty; + enable = true; + callsign = "NOCALL-${toString nodeId}"; + description = "mocked tnc"; + }; + + services.ax25.axlisten = { + enable = true; + }; + + # All mocks radios will connect back to socat-broker on node 1 in order to get + # all messages that are "broadcasted over the ether" + systemd.services.ax25-mock-hardware = { + description = "mock AX.25 TNC and Radio"; + wantedBy = [ "default.target" ]; + before = [ + "ax25-kissattach-${port}.service" + "axlisten.service" + ]; + after = [ "network.target" ]; + serviceConfig = { + Type = "exec"; + ExecStart = "${pkgs.socat}/bin/socat -d -d tcp:192.168.1.1:${toString socatPort} pty,link=${tty},b${toString baud},raw"; + }; + }; + }; + in + { + name = "ax25Simple"; + nodes = { + node1 = lib.mkMerge [ + (createAX25Node 1) + # mimicking radios on the same frequency + { + systemd.services.ax25-mock-ether = { + description = "mock radio ether"; + wantedBy = [ "default.target" ]; + requires = [ "network.target" ]; + before = [ "ax25-mock-hardware.service" ]; + # broken needs access to "ss" or "netstat" + path = [ pkgs.iproute2 ]; + serviceConfig = { + Type = "exec"; + ExecStart = "${pkgs.socat}/bin/socat-broker.sh tcp4-listen:${toString socatPort}"; + }; + postStart = "${pkgs.coreutils}/bin/sleep 2"; + }; + } + ]; + node2 = createAX25Node 2; + node3 = createAX25Node 3; + }; + testScript = + { ... }: + '' + def wait_for_machine(m): + m.succeed("lsmod | grep ax25") + m.wait_for_unit("ax25-axports.target") + m.wait_for_unit("axlisten.service") + m.fail("journalctl -o cat -u axlisten.service | grep -i \"no AX.25 port data configured\"") + + # start the first node since the socat-broker needs to be running + node1.start() + node1.wait_for_unit("ax25-mock-ether.service") + wait_for_machine(node1) + + node2.start() + node3.start() + wait_for_machine(node2) + wait_for_machine(node3) + + # Node 1 -> Node 2 + node1.succeed("echo hello | ax25_call ${port} NOCALL-1 NOCALL-2") + node2.sleep(1) + node2.succeed("journalctl -o cat -u axlisten.service | grep -A1 \"NOCALL-1 to NOCALL-2 ctl I00\" | grep hello") + + # Node 1 -> Node 3 + node1.succeed("echo hello | ax25_call ${port} NOCALL-1 NOCALL-3") + node3.sleep(1) + node3.succeed("journalctl -o cat -u axlisten.service | grep -A1 \"NOCALL-1 to NOCALL-3 ctl I00\" | grep hello") + + # Node 2 -> Node 1 + # must sleep due to previous ax25_call lingering + node2.sleep(5) + node2.succeed("echo hello | ax25_call ${port} NOCALL-2 NOCALL-1") + node1.sleep(1) + node1.succeed("journalctl -o cat -u axlisten.service | grep -A1 \"NOCALL-2 to NOCALL-1 ctl I00\" | grep hello") + + # Node 2 -> Node 3 + node2.succeed("echo hello | ax25_call ${port} NOCALL-2 NOCALL-3") + node3.sleep(1) + node3.succeed("journalctl -o cat -u axlisten.service | grep -A1 \"NOCALL-2 to NOCALL-3 ctl I00\" | grep hello") + + # Node 3 -> Node 1 + # must sleep due to previous ax25_call lingering + node3.sleep(5) + node3.succeed("echo hello | ax25_call ${port} NOCALL-3 NOCALL-1") + node1.sleep(1) + node1.succeed("journalctl -o cat -u axlisten.service | grep -A1 \"NOCALL-3 to NOCALL-1 ctl I00\" | grep hello") + + # Node 3 -> Node 2 + node3.succeed("echo hello | ax25_call ${port} NOCALL-3 NOCALL-2") + node2.sleep(1) + node2.succeed("journalctl -o cat -u axlisten.service | grep -A1 \"NOCALL-3 to NOCALL-2 ctl I00\" | grep hello") + ''; + } +) diff --git a/nixos/tests/cosmic.nix b/nixos/tests/cosmic.nix index 227640c078ee..3f48a384913a 100644 --- a/nixos/tests/cosmic.nix +++ b/nixos/tests/cosmic.nix @@ -75,14 +75,14 @@ if (enableAutologin) then '' with subtest("cosmic-greeter initialisation"): - machine.wait_for_unit("graphical.target") + machine.wait_for_unit("graphical.target", timeout=120) '' else '' from time import sleep - machine.wait_for_unit("graphical.target") - machine.wait_until_succeeds("pgrep --uid ${toString cfg.users.users.cosmic-greeter.name} --full cosmic-greeter") + machine.wait_for_unit("graphical.target", timeout=120) + machine.wait_until_succeeds("pgrep --uid ${toString cfg.users.users.cosmic-greeter.name} --full cosmic-greeter", timeout=30) # Sleep for 10 seconds for ensuring that `greetd` loads the # password prompt for the login screen properly. sleep(10) @@ -96,7 +96,7 @@ # `cosmic-session` target is the Workspaces applet. So, wait # for it to start. The process existing means that COSMIC # now handles any opened windows from now on. - machine.wait_until_succeeds("pgrep --uid ${toString user.uid} --full 'cosmic-panel-button com.system76.CosmicWorkspaces'") + machine.wait_until_succeeds("pgrep --uid ${toString user.uid} --full 'cosmic-panel-button com.system76.CosmicWorkspaces'", timeout=30) # The best way to test for Wayland and XWayland is to launch # the GUI applications and see the results yourself. @@ -121,7 +121,7 @@ machine.wait_until_succeeds(f''''su - ${user.name} -c 'WAYLAND_DISPLAY=wayland-1 XDG_RUNTIME_DIR=/run/user/${toString user.uid} lswt --json | jq ".toplevels" | grep "^ \\"app-id\\": \\"{app_id}\\"$"' '''', timeout=30) machine.succeed(f"pkill {gui_app}", timeout=5) - machine.succeed("echo 'test completed succeessfully' > /${testName}") + machine.succeed("echo 'test completed succeessfully' > /${testName}", timeout=5) machine.copy_from_vm('/${testName}') machine.shutdown() diff --git a/nixos/tests/mailman.nix b/nixos/tests/mailman.nix index d4e09148a9dd..c513c1ed29d3 100644 --- a/nixos/tests/mailman.nix +++ b/nixos/tests/mailman.nix @@ -1,4 +1,5 @@ -import ./make-test-python.nix { +{ ... }: +{ name = "mailman"; nodes.machine = diff --git a/nixos/tests/memcached.nix b/nixos/tests/memcached.nix index c3f8734e320c..de2d7ab421b6 100644 --- a/nixos/tests/memcached.nix +++ b/nixos/tests/memcached.nix @@ -1,32 +1,30 @@ -import ./make-test-python.nix ( - { pkgs, ... }: - { - name = "memcached"; +{ pkgs, ... }: +{ + name = "memcached"; - nodes.machine = { - imports = [ ../modules/profiles/minimal.nix ]; - services.memcached.enable = true; - }; + nodes.machine = { + imports = [ ../modules/profiles/minimal.nix ]; + services.memcached.enable = true; + }; - testScript = - let - testScript = - pkgs.writers.writePython3 "test_memcache" - { - libraries = with pkgs.python3Packages; [ memcached ]; - } - '' - import memcache - c = memcache.Client(['localhost:11211']) - c.set('key', 'value') - assert 'value' == c.get('key') - ''; - in - '' - machine.start() - machine.wait_for_unit("memcached.service") - machine.wait_for_open_port(11211) - machine.succeed("${testScript}") - ''; - } -) + testScript = + let + testScript = + pkgs.writers.writePython3 "test_memcache" + { + libraries = [ pkgs.python3Packages.python-memcached ]; + } + '' + import memcache + c = memcache.Client(['localhost:11211']) + c.set('key', 'value') + assert 'value' == c.get('key') + ''; + in + '' + machine.start() + machine.wait_for_unit("memcached.service") + machine.wait_for_open_port(11211) + machine.succeed("${testScript}") + ''; +} diff --git a/nixos/tests/nextflow.nix b/nixos/tests/nextflow.nix index b4aad98483b9..62ce7d3ea571 100644 --- a/nixos/tests/nextflow.nix +++ b/nixos/tests/nextflow.nix @@ -1,60 +1,58 @@ -import ./make-test-python.nix ( - { pkgs, ... }: - let - bash = pkgs.dockerTools.pullImage { - imageName = "quay.io/nextflow/bash"; - imageDigest = "sha256:bea0e244b7c5367b2b0de687e7d28f692013aa18970941c7dd184450125163ac"; - sha256 = "161s9f24njjx87qrwq0c9nmnwvyc6iblcxka7hirw78lm7i9x4w5"; - finalImageName = "quay.io/nextflow/bash"; - }; +{ pkgs, ... }: +let + bash = pkgs.dockerTools.pullImage { + imageName = "quay.io/nextflow/bash"; + imageDigest = "sha256:bea0e244b7c5367b2b0de687e7d28f692013aa18970941c7dd184450125163ac"; + sha256 = "161s9f24njjx87qrwq0c9nmnwvyc6iblcxka7hirw78lm7i9x4w5"; + finalImageName = "quay.io/nextflow/bash"; + }; - hello = pkgs.stdenv.mkDerivation { - name = "nextflow-hello"; - src = pkgs.fetchFromGitHub { - owner = "nextflow-io"; - repo = "hello"; - rev = "afff16a9b45c8e8a4f5a3743780ac13a541762f8"; - hash = "sha256-c8FirHc+J5Y439g0BdHxRtXVrOAzIrGEKA0m1mp9b/U="; + hello = pkgs.stdenv.mkDerivation { + name = "nextflow-hello"; + src = pkgs.fetchFromGitHub { + owner = "nextflow-io"; + repo = "hello"; + rev = "afff16a9b45c8e8a4f5a3743780ac13a541762f8"; + hash = "sha256-c8FirHc+J5Y439g0BdHxRtXVrOAzIrGEKA0m1mp9b/U="; + }; + installPhase = '' + cp -r $src $out + ''; + }; + run-nextflow-pipeline = pkgs.writeShellApplication { + name = "run-nextflow-pipeline"; + runtimeInputs = [ pkgs.nextflow ]; + text = '' + export NXF_OFFLINE=true + for b in false true; do + echo "docker.enabled = $b" > nextflow.config + cat nextflow.config + nextflow run -ansi-log false ${hello} + done + ''; + }; +in +{ + name = "nextflow"; + + nodes.machine = + { ... }: + { + environment.systemPackages = [ + run-nextflow-pipeline + pkgs.nextflow + ]; + virtualisation = { + docker.enable = true; }; - installPhase = '' - cp -r $src $out - ''; }; - run-nextflow-pipeline = pkgs.writeShellApplication { - name = "run-nextflow-pipeline"; - runtimeInputs = [ pkgs.nextflow ]; - text = '' - export NXF_OFFLINE=true - for b in false true; do - echo "docker.enabled = $b" > nextflow.config - cat nextflow.config - nextflow run -ansi-log false ${hello} - done - ''; - }; - in - { - name = "nextflow"; - nodes.machine = - { ... }: - { - environment.systemPackages = [ - run-nextflow-pipeline - pkgs.nextflow - ]; - virtualisation = { - docker.enable = true; - }; - }; - - testScript = - { nodes, ... }: - '' - start_all() - machine.wait_for_unit("docker.service") - machine.succeed("docker load < ${bash}") - machine.succeed("run-nextflow-pipeline >&2") - ''; - } -) + testScript = + { nodes, ... }: + '' + start_all() + machine.wait_for_unit("docker.service") + machine.succeed("docker load < ${bash}") + machine.succeed("run-nextflow-pipeline >&2") + ''; +} diff --git a/nixos/tests/web-servers/static-web-server.nix b/nixos/tests/web-servers/static-web-server.nix index 1c88e70a0957..0727b5cba021 100644 --- a/nixos/tests/web-servers/static-web-server.nix +++ b/nixos/tests/web-servers/static-web-server.nix @@ -1,41 +1,39 @@ -import ../make-test-python.nix ( - { pkgs, lib, ... }: - { - name = "static-web-server"; - meta = { - maintainers = with lib.maintainers; [ mac-chaffee ]; - }; +{ pkgs, lib, ... }: +{ + name = "static-web-server"; + meta = { + maintainers = with lib.maintainers; [ mac-chaffee ]; + }; - nodes.machine = - { pkgs, ... }: - { - services.static-web-server = { - enable = true; - listen = "[::]:8080"; - root = toString ( - pkgs.writeTextDir "nixos-test.html" '' -

Hello NixOS!

- '' - ); - configuration = { - general = { - directory-listing = true; - }; + nodes.machine = + { pkgs, ... }: + { + services.static-web-server = { + enable = true; + listen = "[::]:8080"; + root = toString ( + pkgs.writeTextDir "nixos-test.html" '' +

Hello NixOS!

+ '' + ); + configuration = { + general = { + directory-listing = true; }; }; }; + }; - testScript = '' - machine.start() - machine.wait_for_unit("static-web-server.socket") - machine.wait_for_open_port(8080) - # We don't use wait_until_succeeds() because we're testing socket - # activation which better work on the first request - response = machine.succeed("curl -fsS localhost:8080") - assert "nixos-test.html" in response, "The directory listing page did not include a link to our nixos-test.html file" - response = machine.succeed("curl -fsS localhost:8080/nixos-test.html") - assert "Hello NixOS!" in response - machine.wait_for_unit("static-web-server.service") - ''; - } -) + testScript = '' + machine.start() + machine.wait_for_unit("static-web-server.socket") + machine.wait_for_open_port(8080) + # We don't use wait_until_succeeds() because we're testing socket + # activation which better work on the first request + response = machine.succeed("curl -fsS localhost:8080") + assert "nixos-test.html" in response, "The directory listing page did not include a link to our nixos-test.html file" + response = machine.succeed("curl -fsS localhost:8080/nixos-test.html") + assert "Hello NixOS!" in response + machine.wait_for_unit("static-web-server.service") + ''; +} diff --git a/pkgs/applications/editors/android-studio/default.nix b/pkgs/applications/editors/android-studio/default.nix index 09fceb7435e5..a42220b34131 100644 --- a/pkgs/applications/editors/android-studio/default.nix +++ b/pkgs/applications/editors/android-studio/default.nix @@ -20,12 +20,12 @@ let sha256Hash = "sha256-VNXErfb4PhljcJwGq863ldh/3i8fMdJirlwolEIk+fI="; }; betaVersion = { - version = "2024.3.2.10"; # "Android Studio Meerkat Feature Drop | 2024.3.2 RC 1" - sha256Hash = "sha256-r5YBpACLzfmChY9ORyvDUNl4j8r32dsqj3W7fbSWZU8="; + version = "2024.3.2.11"; # "Android Studio Meerkat Feature Drop | 2024.3.2 RC 2" + sha256Hash = "sha256-pE17kbLnsEMRtaQencKqckW3uke9IliLkoHP6q3NrQg="; }; latestVersion = { - version = "2025.1.1.4"; # "Android Studio Narwhal | 2025.1.1 Canary 4" - sha256Hash = "sha256-PQe9JEi9Ogoo1hUgPVnCustFgg10v89gTMF7QGi4s1I="; + version = "2025.1.1.6"; # "Android Studio Narwhal | 2025.1.1 Canary 6" + sha256Hash = "sha256-FUDb8/kyvO3M/NJp30VZCyNacJ90y/fawrDTFin7g6o="; }; in { diff --git a/pkgs/applications/editors/emacs/build-support/generic.nix b/pkgs/applications/editors/emacs/build-support/generic.nix index 167f0fcb86b4..b4e96f6490fb 100644 --- a/pkgs/applications/editors/emacs/build-support/generic.nix +++ b/pkgs/applications/editors/emacs/build-support/generic.nix @@ -61,8 +61,7 @@ lib.extendMkDerivation { propagatedUserEnvPkgs = finalAttrs.packageRequires ++ propagatedUserEnvPkgs; strictDeps = args.strictDeps or true; - # TODO re-enable after #392928 reaches master - # __structuredAttrs = args.__structuredAttrs or true; + __structuredAttrs = args.__structuredAttrs or true; inherit turnCompilationWarningToError ignoreCompilationError; diff --git a/pkgs/applications/editors/jetbrains/bin/versions.json b/pkgs/applications/editors/jetbrains/bin/versions.json index 9afcb4807d6d..dfb9764cd741 100644 --- a/pkgs/applications/editors/jetbrains/bin/versions.json +++ b/pkgs/applications/editors/jetbrains/bin/versions.json @@ -59,10 +59,10 @@ "idea-ultimate": { "update-channel": "IntelliJ IDEA RELEASE", "url-template": "https://download.jetbrains.com/idea/ideaIU-{version}.tar.gz", - "version": "2024.3.5", - "sha256": "f8e8e864f4fedddf1d366a7db23fc4132192c3a6029c614a382186ff564a78a1", - "url": "https://download.jetbrains.com/idea/ideaIU-2024.3.5.tar.gz", - "build_number": "243.26053.27" + "version": "2025.1", + "sha256": "9946a690072f166607fd7b0d29e9e9c6a24c79fd5d7365a5600366b0b27532ec", + "url": "https://download.jetbrains.com/idea/ideaIU-2025.1.tar.gz", + "build_number": "251.23774.435" }, "mps": { "update-channel": "MPS RELEASE", diff --git a/pkgs/applications/editors/vim/plugins/overrides.nix b/pkgs/applications/editors/vim/plugins/overrides.nix index 1784aca034f1..22e88798d1a3 100644 --- a/pkgs/applications/editors/vim/plugins/overrides.nix +++ b/pkgs/applications/editors/vim/plugins/overrides.nix @@ -1204,6 +1204,10 @@ in fzf-lua = neovimUtils.buildNeovimPlugin { luaAttr = luaPackages.fzf-lua; runtimeDeps = [ fzf ]; + nvimSkipModules = [ + "fzf-lua.shell_helper" + "fzf-lua.spawn" + ]; }; fzf-vim = super.fzf-vim.overrideAttrs { diff --git a/pkgs/applications/editors/vscode/extensions/ms-vscode-remote.remote-ssh/default.nix b/pkgs/applications/editors/vscode/extensions/ms-vscode-remote.remote-ssh/default.nix index 57e0e3e8b276..cf95ef73c57b 100644 --- a/pkgs/applications/editors/vscode/extensions/ms-vscode-remote.remote-ssh/default.nix +++ b/pkgs/applications/editors/vscode/extensions/ms-vscode-remote.remote-ssh/default.nix @@ -61,7 +61,7 @@ let if ! nodeVersion=$($serverNode -v); then echo "Unable to fix Node binary, quitting" - fail_with_exitcode ''${o.InstallExitCode.ServerTransferFailed} + fail_with_exitcode ''${f.UnifiedStatusCode.ServerTransferFailed} fi ${lib.optionalString useLocalExtensions '' diff --git a/pkgs/applications/emulators/blink/default.nix b/pkgs/applications/emulators/blink/default.nix index a65ebf5886b3..1474675e21bb 100644 --- a/pkgs/applications/emulators/blink/default.nix +++ b/pkgs/applications/emulators/blink/default.nix @@ -2,6 +2,7 @@ stdenv, fetchFromGitHub, lib, + zlib, }: stdenv.mkDerivation (finalAttrs: { @@ -15,6 +16,8 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-4wgDftXOYm2fMP+/aTRljDi38EzbbwAJlQkuxjAMl3I="; }; + buildInputs = [ zlib ]; + # Do not include --enable-static and --disable-shared flags during static compilation dontAddStaticConfigureFlags = true; diff --git a/pkgs/applications/emulators/libretro/cores/dosbox-pure.nix b/pkgs/applications/emulators/libretro/cores/dosbox-pure.nix index a1f582cda4a9..dd0e95243d5f 100644 --- a/pkgs/applications/emulators/libretro/cores/dosbox-pure.nix +++ b/pkgs/applications/emulators/libretro/cores/dosbox-pure.nix @@ -5,13 +5,13 @@ }: mkLibretroCore { core = "dosbox-pure"; - version = "0-unstable-2025-03-18"; + version = "0-unstable-2025-04-10"; src = fetchFromGitHub { owner = "schellingb"; repo = "dosbox-pure"; - rev = "619c575db6f81d1911e36f1ecd618c9dead86859"; - hash = "sha256-Pp3OP69KKrznOl1cY5yiKxMJRA7REe4S51zGDHG883c="; + rev = "51ca5126ee67e88827c87c761a097a6318ad25e7"; + hash = "sha256-OBC8y53ljmgmfow7qBWIJYgjAiyv2bVa3CqQFkaJRhQ="; }; hardeningDisable = [ "format" ]; diff --git a/pkgs/applications/emulators/libretro/cores/fbneo.nix b/pkgs/applications/emulators/libretro/cores/fbneo.nix index 9564ccde7b29..f366a11eb0c6 100644 --- a/pkgs/applications/emulators/libretro/cores/fbneo.nix +++ b/pkgs/applications/emulators/libretro/cores/fbneo.nix @@ -5,13 +5,13 @@ }: mkLibretroCore { core = "fbneo"; - version = "0-unstable-2025-04-05"; + version = "0-unstable-2025-04-15"; src = fetchFromGitHub { owner = "libretro"; repo = "fbneo"; - rev = "c21c0a0393a1cc68db7250022d18039a30de51f4"; - hash = "sha256-AZyYUftVHlxR+QHCsIcNI2hTIEDYeInYPdmum++EtpU="; + rev = "ffdacc6a7ce719b6371ad0a6143ce46726ed5d25"; + hash = "sha256-Pdp/pPsZujbAK6pEE5LT6KCdJ/RFW1zR67bWvI/efJI="; }; makefile = "Makefile"; diff --git a/pkgs/applications/emulators/libretro/cores/flycast.nix b/pkgs/applications/emulators/libretro/cores/flycast.nix index 8823d203a995..24cd24aa79f4 100644 --- a/pkgs/applications/emulators/libretro/cores/flycast.nix +++ b/pkgs/applications/emulators/libretro/cores/flycast.nix @@ -8,13 +8,13 @@ }: mkLibretroCore { core = "flycast"; - version = "0-unstable-2025-04-05"; + version = "0-unstable-2025-04-15"; src = fetchFromGitHub { owner = "flyinghead"; repo = "flycast"; - rev = "3114394019fc0f772c29d0a1f5493fbdce4745b0"; - hash = "sha256-bp10601cfcsb62Vy88zIjFZ/yBUGVODEt96Me7XX5kY="; + rev = "25a882341d5ebbf8124ddd2a7421592678dfac2e"; + hash = "sha256-N/7JZbEzYaOAoUShkmQd1G61ke1U3OSeFMXS0lqftYU="; fetchSubmodules = true; }; diff --git a/pkgs/applications/emulators/libretro/cores/ppsspp.nix b/pkgs/applications/emulators/libretro/cores/ppsspp.nix index 1a6dab365d44..dcaf99312532 100644 --- a/pkgs/applications/emulators/libretro/cores/ppsspp.nix +++ b/pkgs/applications/emulators/libretro/cores/ppsspp.nix @@ -13,13 +13,13 @@ }: mkLibretroCore { core = "ppsspp"; - version = "0-unstable-2025-04-06"; + version = "0-unstable-2025-04-15"; src = fetchFromGitHub { owner = "hrydgard"; repo = "ppsspp"; - rev = "031421ba4de8559f8bbdbd9367b29be28f6a45cb"; - hash = "sha256-eaXR/w0Iz9tmTgZKHVcZYXJbXaVPnYudSal0vcsQ9a0="; + rev = "599edb24f01bbb7ce0e685e3c5585a02781549c7"; + hash = "sha256-cPalfNXV6U2jLCTqXedQzn9pyWiscaZrrQM32D70uYE="; fetchSubmodules = true; }; diff --git a/pkgs/applications/graphics/gimp/2.0/default.nix b/pkgs/applications/graphics/gimp/2.0/default.nix new file mode 100644 index 000000000000..1d64cc10806f --- /dev/null +++ b/pkgs/applications/graphics/gimp/2.0/default.nix @@ -0,0 +1,226 @@ +{ + stdenv, + lib, + fetchurl, + replaceVars, + autoreconfHook, + pkg-config, + intltool, + babl, + gegl, + gtk2, + glib, + gdk-pixbuf, + isocodes, + pango, + cairo, + freetype, + fontconfig, + lcms, + libpng, + libjpeg, + libjxl, + poppler, + poppler_data, + libtiff, + libmng, + librsvg, + libwmf, + zlib, + libzip, + ghostscript, + aalib, + shared-mime-info, + libexif, + gettext, + makeWrapper, + gtk-doc, + xorg, + glib-networking, + libmypaint, + gexiv2, + harfbuzz, + mypaint-brushes1, + libwebp, + libheif, + libxslt, + libgudev, + openexr, + desktopToDarwinBundle, + AppKit, + Cocoa, + gtk-mac-integration-gtk2, + withPython ? false, + python2, +}: + +let + python = python2.withPackages (pp: [ pp.pygtk ]); +in +stdenv.mkDerivation (finalAttrs: { + pname = "gimp"; + version = "2.10.38"; + + outputs = [ + "out" + "dev" + ]; + + src = fetchurl { + url = "http://download.gimp.org/pub/gimp/v${lib.versions.majorMinor finalAttrs.version}/gimp-${finalAttrs.version}.tar.bz2"; + sha256 = "sha256-UKhF7sEciDH+hmFweVD1uERuNfMO37ms+Y+FwRM/hW4="; + }; + + patches = [ + # to remove compiler from the runtime closure, reference was retained via + # gimp --version --verbose output + (replaceVars ./remove-cc-reference.patch { + cc_version = stdenv.cc.cc.name; + }) + + # Use absolute paths instead of relying on PATH + # to make sure plug-ins are loaded by the correct interpreter. + ./hardcode-plugin-interpreters.patch + + # GIMP queries libheif.pc for builtin encoder/decoder support to determine if AVIF/HEIC files are supported + # (see https://gitlab.gnome.org/GNOME/gimp/-/blob/a8b1173ca441283971ee48f4778e2ffd1cca7284/configure.ac?page=2#L1846-1852) + # These variables have been removed since libheif 1.18.0 + # (see https://github.com/strukturag/libheif/commit/cf0d89c6e0809427427583290547a7757428cf5a) + # This has already been fixed for the upcoming GIMP 3, but the fix has not been backported to 2.x yet + # (see https://gitlab.gnome.org/GNOME/gimp/-/issues/9080) + ./force-enable-libheif.patch + ]; + + nativeBuildInputs = + [ + autoreconfHook # hardcode-plugin-interpreters.patch changes Makefile.am + pkg-config + intltool + gettext + makeWrapper + gtk-doc + libxslt + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + desktopToDarwinBundle + ]; + + buildInputs = + [ + babl + gegl + gtk2 + glib + gdk-pixbuf + pango + cairo + gexiv2 + harfbuzz + isocodes + freetype + fontconfig + lcms + libpng + libjpeg + libjxl + poppler + poppler_data + libtiff + openexr + libmng + librsvg + libwmf + zlib + libzip + ghostscript + aalib + shared-mime-info + libwebp + libheif + libexif + xorg.libXpm + glib-networking + libmypaint + mypaint-brushes1 + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + AppKit + Cocoa + gtk-mac-integration-gtk2 + ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ + libgudev + ] + ++ lib.optionals withPython [ + python + # Duplicated here because python.withPackages does not expose the dev output with pkg-config files + python2.pkgs.pygtk + ]; + + # needed by gimp-2.0.pc + propagatedBuildInputs = [ + gegl + ]; + + configureFlags = + [ + "--without-webkit" # old version is required + "--disable-check-update" + "--with-bug-report-url=https://github.com/NixOS/nixpkgs/issues/new" + "--with-icc-directory=/run/current-system/sw/share/color/icc" + # fix libdir in pc files (${exec_prefix} needs to be passed verbatim) + "--libdir=\${exec_prefix}/lib" + ] + ++ lib.optionals (!withPython) [ + "--disable-python" # depends on Python2 which was EOLed on 2020-01-01 + ]; + + enableParallelBuilding = true; + + doCheck = true; + + env = { + NIX_CFLAGS_COMPILE = toString ( + [ ] + ++ lib.optionals stdenv.cc.isGNU [ "-Wno-error=incompatible-pointer-types" ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-DGDK_OSX_BIG_SUR=16" ] + ); + + # Check if librsvg was built with --disable-pixbuf-loader. + PKG_CONFIG_GDK_PIXBUF_2_0_GDK_PIXBUF_MODULEDIR = "${librsvg}/${gdk-pixbuf.moduleDir}"; + }; + + preConfigure = '' + # The check runs before glib-networking is registered + export GIO_EXTRA_MODULES="${glib-networking}/lib/gio/modules:$GIO_EXTRA_MODULES" + ''; + + postFixup = '' + wrapProgram $out/bin/gimp-${lib.versions.majorMinor finalAttrs.version} \ + --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" + ''; + + passthru = { + # The declarations for `gimp-with-plugins` wrapper, + # used for determining plug-in installation paths + majorVersion = "${lib.versions.major finalAttrs.version}.0"; + targetLibDir = "lib/gimp/${finalAttrs.passthru.majorVersion}"; + targetDataDir = "share/gimp/${finalAttrs.passthru.majorVersion}"; + targetPluginDir = "${finalAttrs.passthru.targetLibDir}/plug-ins"; + targetScriptDir = "${finalAttrs.passthru.targetDataDir}/scripts"; + + # probably its a good idea to use the same gtk in plugins ? + gtk = gtk2; + + python2Support = withPython; + }; + + meta = with lib; { + description = "GNU Image Manipulation Program"; + homepage = "https://www.gimp.org/"; + maintainers = with maintainers; [ ]; + license = licenses.gpl3Plus; + platforms = platforms.unix; + mainProgram = "gimp"; + }; +}) diff --git a/pkgs/applications/graphics/gimp/force-enable-libheif.patch b/pkgs/applications/graphics/gimp/2.0/force-enable-libheif.patch similarity index 100% rename from pkgs/applications/graphics/gimp/force-enable-libheif.patch rename to pkgs/applications/graphics/gimp/2.0/force-enable-libheif.patch diff --git a/pkgs/applications/graphics/gimp/2.0/hardcode-plugin-interpreters.patch b/pkgs/applications/graphics/gimp/2.0/hardcode-plugin-interpreters.patch new file mode 100644 index 000000000000..1528404c31d2 --- /dev/null +++ b/pkgs/applications/graphics/gimp/2.0/hardcode-plugin-interpreters.patch @@ -0,0 +1,11 @@ +--- a/plug-ins/pygimp/Makefile.am ++++ b/plug-ins/pygimp/Makefile.am +@@ -157,7 +157,7 @@ install-interp-file: + echo 'python=$(PYBIN_PATH)' > '$(DESTDIR)$(pyinterpfile)' + echo 'python2=$(PYBIN_PATH)' >> '$(DESTDIR)$(pyinterpfile)' + echo '/usr/bin/python=$(PYBIN_PATH)' >> '$(DESTDIR)$(pyinterpfile)' +- echo ":Python:E::py::`basename $(PYTHON)`:" >> '$(DESTDIR)$(pyinterpfile)' ++ echo ":Python:E::py::$(PYTHON):" >> '$(DESTDIR)$(pyinterpfile)' + + install-data-local: install-env-file install-interp-file + diff --git a/pkgs/applications/graphics/gimp/2.0/remove-cc-reference.patch b/pkgs/applications/graphics/gimp/2.0/remove-cc-reference.patch new file mode 100644 index 000000000000..20c350bdaea1 --- /dev/null +++ b/pkgs/applications/graphics/gimp/2.0/remove-cc-reference.patch @@ -0,0 +1,13 @@ +diff --git a/app/gimp-version.c b/app/gimp-version.c +index 3d1894a036..48bb670b64 100644 +--- a/app/gimp-version.c ++++ b/app/gimp-version.c +@@ -230,7 +230,7 @@ gimp_version (gboolean be_verbose, + GIMP_BUILD_ID, + gimp_version_get_revision (), + GIMP_BUILD_PLATFORM_FAMILY, +- CC_VERSION, ++ "@cc_version@", + lib_versions); + g_free (lib_versions); + diff --git a/pkgs/applications/graphics/gimp/default.nix b/pkgs/applications/graphics/gimp/default.nix index e5e552f299f9..0b2406c89f8b 100644 --- a/pkgs/applications/graphics/gimp/default.nix +++ b/pkgs/applications/graphics/gimp/default.nix @@ -3,21 +3,27 @@ lib, fetchurl, replaceVars, - autoreconfHook, + meson, + ninja, pkg-config, - intltool, babl, + cfitsio, gegl, - gtk2, + gtk3, glib, gdk-pixbuf, + graphviz, isocodes, pango, cairo, + libarchive, + luajit, freetype, fontconfig, lcms, libpng, + libiff, + libilbm, libjpeg, libjxl, poppler, @@ -31,44 +37,59 @@ ghostscript, aalib, shared-mime-info, + python3, libexif, gettext, - makeWrapper, - gtk-doc, + wrapGAppsHook3, + libxslt, + gobject-introspection, + vala, + gi-docgen, + perl, + appstream-glib, + desktop-file-utils, xorg, glib-networking, + json-glib, libmypaint, + llvmPackages, gexiv2, harfbuzz, mypaint-brushes1, libwebp, libheif, - libxslt, + gjs, libgudev, openexr, + xvfb-run, + dbus, + adwaita-icon-theme, + alsa-lib, desktopToDarwinBundle, AppKit, Cocoa, - gtk-mac-integration-gtk2, - withPython ? false, - python2, }: let - python = python2.withPackages (pp: [ pp.pygtk ]); + python = python3.withPackages ( + pp: with pp; [ + pygobject3 + ] + ); in stdenv.mkDerivation (finalAttrs: { pname = "gimp"; - version = "2.10.38"; + version = "3.0.2"; outputs = [ "out" "dev" + "devdoc" ]; src = fetchurl { - url = "http://download.gimp.org/pub/gimp/v${lib.versions.majorMinor finalAttrs.version}/gimp-${finalAttrs.version}.tar.bz2"; - sha256 = "sha256-UKhF7sEciDH+hmFweVD1uERuNfMO37ms+Y+FwRM/hW4="; + url = "https://download.gimp.org/gimp/v${lib.versions.majorMinor finalAttrs.version}/gimp-${finalAttrs.version}.tar.xz"; + hash = "sha256-VG3cMMstDnkSPH/LTXghHh7npqrOkaagrYy8v26lcaI="; }; patches = [ @@ -80,26 +101,40 @@ stdenv.mkDerivation (finalAttrs: { # Use absolute paths instead of relying on PATH # to make sure plug-ins are loaded by the correct interpreter. - ./hardcode-plugin-interpreters.patch + # TODO: This now only appears to be used on Windows. + (replaceVars ./hardcode-plugin-interpreters.patch { + python_interpreter = python.interpreter; + PYTHON_EXE = null; + }) - # GIMP queries libheif.pc for builtin encoder/decoder support to determine if AVIF/HEIC files are supported - # (see https://gitlab.gnome.org/GNOME/gimp/-/blob/a8b1173ca441283971ee48f4778e2ffd1cca7284/configure.ac?page=2#L1846-1852) - # These variables have been removed since libheif 1.18.0 - # (see https://github.com/strukturag/libheif/commit/cf0d89c6e0809427427583290547a7757428cf5a) - # This has already been fixed for the upcoming GIMP 3, but the fix has not been backported to 2.x yet - # (see https://gitlab.gnome.org/GNOME/gimp/-/issues/9080) - ./force-enable-libheif.patch + # D-Bus configuration is not available in the build sandbox + # so we need to pick up the one from the package. + (replaceVars ./tests-dbus-conf.patch { + session_conf = "${dbus.out}/share/dbus-1/session.conf"; + }) ]; nativeBuildInputs = [ - autoreconfHook # hardcode-plugin-interpreters.patch changes Makefile.am + meson + ninja pkg-config - intltool gettext - makeWrapper - gtk-doc - libxslt + wrapGAppsHook3 + libxslt # for xsltproc + gobject-introspection + perl + vala + + # for docs + gi-docgen + + # for tests + desktop-file-utils + ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ + dbus + xvfb-run ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ desktopToDarwinBundle @@ -107,13 +142,16 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ + appstream-glib # for library babl + cfitsio gegl - gtk2 + gtk3 glib gdk-pixbuf pango cairo + libarchive gexiv2 harfbuzz isocodes @@ -121,6 +159,8 @@ stdenv.mkDerivation (finalAttrs: { fontconfig lcms libpng + libiff + libilbm libjpeg libjxl poppler @@ -135,69 +175,137 @@ stdenv.mkDerivation (finalAttrs: { ghostscript aalib shared-mime-info + json-glib libwebp libheif + python libexif xorg.libXpm + xorg.libXmu glib-networking libmypaint mypaint-brushes1 + + # New file dialogue crashes with “Icon 'image-missing' not present in theme Symbolic” without an icon theme. + adwaita-icon-theme + + # for Lua plug-ins + (luajit.withPackages (pp: [ + pp.lgi + ])) + ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ + alsa-lib + + # for JavaScript plug-ins + gjs ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ + llvmPackages.openmp AppKit Cocoa - gtk-mac-integration-gtk2 ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libgudev - ] - ++ lib.optionals withPython [ - python - # Duplicated here because python.withPackages does not expose the dev output with pkg-config files - python2.pkgs.pygtk ]; - # needed by gimp-2.0.pc propagatedBuildInputs = [ + # needed by gimp-3.0.pc gegl + cairo + pango + gexiv2 ]; - configureFlags = + mesonFlags = [ - "--without-webkit" # old version is required - "--disable-check-update" - "--with-bug-report-url=https://github.com/NixOS/nixpkgs/issues/new" - "--with-icc-directory=/run/current-system/sw/share/color/icc" - # fix libdir in pc files (${exec_prefix} needs to be passed verbatim) - "--libdir=\${exec_prefix}/lib" + "-Dbug-report-url=https://github.com/NixOS/nixpkgs/issues/new" + "-Dicc-directory=/run/current-system/sw/share/color/icc" + "-Dcheck-update=no" + (lib.mesonEnable "gudev" stdenv.hostPlatform.isLinux) + (lib.mesonEnable "headless-tests" stdenv.hostPlatform.isLinux) + (lib.mesonEnable "linux-input" stdenv.hostPlatform.isLinux) + # Not very important to do downstream, save a dependency. + "-Dappdata-test=disabled" ] - ++ lib.optionals (!withPython) [ - "--disable-python" # depends on Python2 which was EOLed on 2020-01-01 + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + "-Dalsa=disabled" + "-Djavascript=disabled" ]; - enableParallelBuilding = true; - doCheck = true; env = { - NIX_CFLAGS_COMPILE = toString ( - [ ] - ++ lib.optionals stdenv.cc.isGNU [ "-Wno-error=incompatible-pointer-types" ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-DGDK_OSX_BIG_SUR=16" ] - ); + # The check runs before glib-networking is registered + GIO_EXTRA_MODULES = "${glib-networking}/lib/gio/modules"; + + NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-DGDK_OSX_BIG_SUR=16"; # Check if librsvg was built with --disable-pixbuf-loader. PKG_CONFIG_GDK_PIXBUF_2_0_GDK_PIXBUF_MODULEDIR = "${librsvg}/${gdk-pixbuf.moduleDir}"; }; - preConfigure = '' - # The check runs before glib-networking is registered - export GIO_EXTRA_MODULES="${glib-networking}/lib/gio/modules:$GIO_EXTRA_MODULES" + postPatch = '' + patchShebangs \ + app/tests/create_test_env.sh \ + tools/gimp-mkenums + + # GIMP is executed at build time so we need to fix this. + # TODO: Look into if we can fix the interp thing. + chmod +x plug-ins/python/{colorxhtml,file-openraster,foggify,gradients-save-as-css,histogram-export,palette-offset,palette-sort,palette-to-gradient,python-eval,spyro-plus}.py + patchShebangs \ + plug-ins/python/{colorxhtml,file-openraster,foggify,gradients-save-as-css,histogram-export,palette-offset,palette-sort,palette-to-gradient,python-eval,spyro-plus}.py + ''; + + preBuild = + let + librarySuffix = + if stdenv.hostPlatform.extensions.library == ".so" then + "3.0.so.0" + else if stdenv.hostPlatform.extensions.library == ".dylib" then + "3.0.0.dylib" + else + throw "Unsupported library extension ‘${stdenv.hostPlatform.extensions.library}’"; + in + '' + # Our gobject-introspection patches make the shared library paths absolute + # in the GIR files. When running GIMP in build or check phase, it will try + # to use plug-ins, which import GIMP introspection files which will try + # to load the GIMP libraries which will not be installed yet. + # So we need to replace the absolute path with a local one. + # We are using a symlink that will be overridden during installation. + mkdir -p "$out/lib" + ln -s "$PWD/libgimp/libgimp-${librarySuffix}" \ + "$PWD/libgimpbase/libgimpbase-${librarySuffix}" \ + "$PWD/libgimpcolor/libgimpcolor-${librarySuffix}" \ + "$PWD/libgimpconfig/libgimpconfig-${librarySuffix}" \ + "$PWD/libgimpmath/libgimpmath-${librarySuffix}" \ + "$PWD/libgimpmodule/libgimpmodule-${librarySuffix}" \ + "$out/lib/" + ''; + + preCheck = '' + # Avoid “Error retrieving accessibility bus address” + export NO_AT_BRIDGE=1 + # Fix storing recent file list in tests + export HOME="$TMPDIR" + export XDG_DATA_DIRS="${glib.getSchemaDataDirPath gtk3}:${adwaita-icon-theme}/share:$XDG_DATA_DIRS" + ''; + + preFixup = '' + gappsWrapperArgs+=(--prefix PATH : "${ + lib.makeBinPath [ + # for dot for gegl:introspect (Debug » Show Image Graph, hidden by default on stable release) + graphviz + # for gimp-script-fu-interpreter-3.0 invoked by shebang of some plug-ins + "$out" + ] + }") ''; postFixup = '' - wrapProgram $out/bin/gimp-${lib.versions.majorMinor finalAttrs.version} \ - --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" + # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back. + moveToOutput "share/doc" "$devdoc" ''; passthru = { @@ -210,9 +318,7 @@ stdenv.mkDerivation (finalAttrs: { targetScriptDir = "${finalAttrs.passthru.targetDataDir}/scripts"; # probably its a good idea to use the same gtk in plugins ? - gtk = gtk2; - - python2Support = withPython; + gtk = gtk3; }; meta = with lib; { @@ -220,7 +326,7 @@ stdenv.mkDerivation (finalAttrs: { homepage = "https://www.gimp.org/"; maintainers = with maintainers; [ jtojnar ]; license = licenses.gpl3Plus; - platforms = platforms.unix; + platforms = platforms.linux; mainProgram = "gimp"; }; }) diff --git a/pkgs/applications/graphics/gimp/hardcode-plugin-interpreters.patch b/pkgs/applications/graphics/gimp/hardcode-plugin-interpreters.patch index 1528404c31d2..6a0ec0af6262 100644 --- a/pkgs/applications/graphics/gimp/hardcode-plugin-interpreters.patch +++ b/pkgs/applications/graphics/gimp/hardcode-plugin-interpreters.patch @@ -1,11 +1,8 @@ ---- a/plug-ins/pygimp/Makefile.am -+++ b/plug-ins/pygimp/Makefile.am -@@ -157,7 +157,7 @@ install-interp-file: - echo 'python=$(PYBIN_PATH)' > '$(DESTDIR)$(pyinterpfile)' - echo 'python2=$(PYBIN_PATH)' >> '$(DESTDIR)$(pyinterpfile)' - echo '/usr/bin/python=$(PYBIN_PATH)' >> '$(DESTDIR)$(pyinterpfile)' -- echo ":Python:E::py::`basename $(PYTHON)`:" >> '$(DESTDIR)$(pyinterpfile)' -+ echo ":Python:E::py::$(PYTHON):" >> '$(DESTDIR)$(pyinterpfile)' - - install-data-local: install-env-file install-interp-file - +--- a/plug-ins/python/pygimp.interp.in ++++ b/plug-ins/python/pygimp.interp.in +@@ -2,4 +2,4 @@ python=@PYTHON_EXE@ + python3=@PYTHON_EXE@ + /usr/bin/python=@PYTHON_EXE@ + /usr/bin/python3=@PYTHON_EXE@ +-:Python:E::py::python3: ++:Python:E::py::@python_interpreter@: diff --git a/pkgs/applications/graphics/gimp/plugins/default.nix b/pkgs/applications/graphics/gimp/plugins/default.nix index b237c5f1bcf1..9c86343599b1 100644 --- a/pkgs/applications/graphics/gimp/plugins/default.nix +++ b/pkgs/applications/graphics/gimp/plugins/default.nix @@ -2,7 +2,11 @@ # If you just want a subset of plug-ins, you can specify them explicitly: # `gimp-with-plugins.override { plugins = with gimpPlugins; [ gap ]; }`. -{ lib, pkgs }: +{ + lib, + pkgs, + gimp, +}: let inherit (pkgs) @@ -16,6 +20,10 @@ let fetchFromGitHub fetchFromGitLab ; + + # We cannot use gimp from the arguments directly, or it would be shadowed by the one + # from scope when initializing the scope with it, leading to infinite recursion. + gimpArg = gimp; in lib.makeScope pkgs.newScope ( @@ -29,6 +37,7 @@ lib.makeScope pkgs.newScope ( attrs: let name = attrs.name or "${attrs.pname}-${attrs.version}"; + pkgConfigMajorVersion = lib.versions.major gimp.version; in stdenv.mkDerivation ( { @@ -63,8 +72,10 @@ lib.makeScope pkgs.newScope ( # Override installation paths. env = { - PKG_CONFIG_GIMP_2_0_GIMPLIBDIR = "${placeholder "out"}/${gimp.targetLibDir}"; - PKG_CONFIG_GIMP_2_0_GIMPDATADIR = "${placeholder "out"}/${gimp.targetDataDir}"; + "PKG_CONFIG_GIMP_${pkgConfigMajorVersion}_0_GIMPLIBDIR" = + "${placeholder "out"}/${gimp.targetLibDir}"; + "PKG_CONFIG_GIMP_${pkgConfigMajorVersion}_0_GIMPDATADIR" = + "${placeholder "out"}/${gimp.targetDataDir}"; } // attrs.env or { }; } ); @@ -86,7 +97,7 @@ lib.makeScope pkgs.newScope ( in { # Allow overriding GIMP package in the scope. - inherit (pkgs) gimp; + gimp = gimpArg; bimp = pluginDerivation rec { /* @@ -130,6 +141,7 @@ lib.makeScope pkgs.newScope ( installTargets = [ "install-admin" ]; meta = with lib; { + broken = gimp.majorVersion != "2.0"; description = "Batch Image Manipulation Plugin for GIMP"; homepage = "https://github.com/alessandrofrancesconi/gimp-plugin-bimp"; license = licenses.gpl2Plus; @@ -153,6 +165,7 @@ lib.makeScope pkgs.newScope ( ''; meta = { + broken = gimp.majorVersion != "2.0"; description = "Gimp plug-in for the farbfeld image format"; homepage = "https://github.com/ids1024/gimp-farbfeld"; license = lib.licenses.mit; @@ -192,6 +205,7 @@ lib.makeScope pkgs.newScope ( ''; meta = with lib; { + broken = gimp.majorVersion != "2.0"; description = "GIMP plug-in to do the fourier transform"; homepage = "https://people.via.ecp.fr/~remi/soft/gimp/gimp_plugin_en.php3#fourier"; license = with licenses; [ gpl3Plus ]; @@ -222,7 +236,7 @@ lib.makeScope pkgs.newScope ( }; meta = { - broken = !gimp.python2Support; + broken = gimp.majorVersion != "2.0"; }; }; @@ -240,6 +254,10 @@ lib.makeScope pkgs.newScope ( ninja gettext ]; + + meta = { + broken = gimp.majorVersion != "2.0"; + }; }; waveletSharpen = pluginDerivation { @@ -264,6 +282,10 @@ lib.makeScope pkgs.newScope ( }; installPhase = "installPlugin src/wavelet-sharpen"; # TODO translations are not copied .. How to do this on nix? + + meta = { + broken = gimp.majorVersion != "2.0"; + }; }; lqrPlugin = pluginDerivation rec { @@ -289,10 +311,15 @@ lib.makeScope pkgs.newScope ( sha256 = "EdjZWM6U1bhUmsOnLA8iJ4SFKuAXHIfNPzxZqel+JrY="; }) ]; + + meta = { + broken = gimp.majorVersion != "2.0"; + }; }; gmic = pkgs.gmic-qt.override { variant = "gimp"; + inherit (self) gimp; }; gimplensfun = pluginDerivation { @@ -320,6 +347,7 @@ lib.makeScope pkgs.newScope ( "; meta = { + broken = gimp.majorVersion != "2.0"; description = "GIMP plugin to correct lens distortion using the lensfun library and database"; homepage = "http://lensfun.sebastiankraft.net/"; diff --git a/pkgs/applications/graphics/gimp/remove-cc-reference.patch b/pkgs/applications/graphics/gimp/remove-cc-reference.patch index 20c350bdaea1..8b62b801f02b 100644 --- a/pkgs/applications/graphics/gimp/remove-cc-reference.patch +++ b/pkgs/applications/graphics/gimp/remove-cc-reference.patch @@ -1,8 +1,8 @@ diff --git a/app/gimp-version.c b/app/gimp-version.c -index 3d1894a036..48bb670b64 100644 +index 6e311c8252..e6fd9d1d78 100644 --- a/app/gimp-version.c +++ b/app/gimp-version.c -@@ -230,7 +230,7 @@ gimp_version (gboolean be_verbose, +@@ -90,7 +90,7 @@ gimp_version (gboolean be_verbose, GIMP_BUILD_ID, gimp_version_get_revision (), GIMP_BUILD_PLATFORM_FAMILY, diff --git a/pkgs/applications/graphics/gimp/tests-dbus-conf.patch b/pkgs/applications/graphics/gimp/tests-dbus-conf.patch new file mode 100644 index 000000000000..da9152eeef01 --- /dev/null +++ b/pkgs/applications/graphics/gimp/tests-dbus-conf.patch @@ -0,0 +1,11 @@ +--- a/build/meson/run_test_env.sh ++++ b/build/meson/run_test_env.sh +@@ -33,7 +33,7 @@ if [ -n "${UI_TEST}" ]; then + OPT="--auto-servernum" + fi + xvfb-run $OPT --server-args="-screen 0 1280x1024x24" \ +- dbus-run-session -- "$@" ++ dbus-run-session --config-file="@session_conf@" -- "$@" + + else + # Run the executable directly, diff --git a/pkgs/applications/graphics/gimp/wrapper.nix b/pkgs/applications/graphics/gimp/wrapper.nix index 82ff058ba7dc..efac48c2f7e2 100644 --- a/pkgs/applications/graphics/gimp/wrapper.nix +++ b/pkgs/applications/graphics/gimp/wrapper.nix @@ -13,8 +13,14 @@ let lib.attrValues gimpPlugins ); selectedPlugins = lib.filter (pkg: pkg != gimp) (if plugins == null then allPlugins else plugins); - extraArgs = map (x: x.wrapArgs or "") selectedPlugins; - versionBranch = lib.versions.majorMinor gimp.version; + extraArgs = + map (x: x.wrapArgs or "") selectedPlugins + ++ lib.optionals (gimp.majorVersion == "2.0") [ + ''--prefix GTK_PATH : "${gnome-themes-extra}/lib/gtk-2.0"'' + ]; + exeVersion = + if gimp.majorVersion == "2.0" then lib.versions.majorMinor gimp.version else gimp.majorVersion; + majorVersion = lib.versions.major gimp.version; in symlinkJoin { @@ -25,16 +31,15 @@ symlinkJoin { nativeBuildInputs = [ makeWrapper ]; postBuild = '' - for each in gimp-${versionBranch} gimp-console-${versionBranch}; do + for each in gimp-${exeVersion} gimp-console-${exeVersion}; do wrapProgram $out/bin/$each \ - --set GIMP2_PLUGINDIR "$out/lib/gimp/2.0" \ - --set GIMP2_DATADIR "$out/share/gimp/2.0" \ - --prefix GTK_PATH : "${gnome-themes-extra}/lib/gtk-2.0" \ + --set GIMP${majorVersion}_PLUGINDIR "$out/${gimp.targetLibDir}" \ + --set GIMP${majorVersion}_DATADIR "$out/${gimp.targetDataDir}" \ ${toString extraArgs} done set +x for each in gimp gimp-console; do - ln -sf "$each-${versionBranch}" $out/bin/$each + ln -sf "$each-${exeVersion}" $out/bin/$each done ''; diff --git a/pkgs/applications/misc/1password-gui/default.nix b/pkgs/applications/misc/1password-gui/default.nix index bf705566c2b3..2e10367ad3d7 100644 --- a/pkgs/applications/misc/1password-gui/default.nix +++ b/pkgs/applications/misc/1password-gui/default.nix @@ -37,6 +37,7 @@ let timstott savannidgerinel sebtm + bdd ]; platforms = builtins.attrNames sources.${channel}; mainProgram = "1password"; diff --git a/pkgs/applications/misc/1password-gui/sources.json b/pkgs/applications/misc/1password-gui/sources.json index f0dca4321f30..2507f163ebe0 100644 --- a/pkgs/applications/misc/1password-gui/sources.json +++ b/pkgs/applications/misc/1password-gui/sources.json @@ -1,20 +1,20 @@ { "stable": { "x86_64-linux": { - "url": "https://downloads.1password.com/linux/tar/stable/x86_64/1password-8.10.70.x64.tar.gz", - "hash": "sha256-QGKeKX7qxu7heJ6T0I8aayI1P2M3KOmU9faS929BCjI=" + "url": "https://downloads.1password.com/linux/tar/stable/x86_64/1password-8.10.72.x64.tar.gz", + "hash": "sha256-vJJ5Dh3K3B0DAEVMifiITNJmOtkCyn0XYS4tdYxoKjM=" }, "aarch64-linux": { - "url": "https://downloads.1password.com/linux/tar/stable/aarch64/1password-8.10.70.arm64.tar.gz", - "hash": "sha256-Uz8YKlIa6zibRv3ObnVVlyEk3sZP5wX+0E/nX02m6SA=" + "url": "https://downloads.1password.com/linux/tar/stable/aarch64/1password-8.10.72.arm64.tar.gz", + "hash": "sha256-GLDmBiIXGRQVy7wjW/52gIx97E6Q+A3wJwOGQvW29p8=" }, "x86_64-darwin": { - "url": "https://downloads.1password.com/mac/1Password-8.10.70-x86_64.zip", - "hash": "sha256-s6+LUSHZwCH5PgREt2bkCCR3JeGBj9llQ6rGrOhEPlQ=" + "url": "https://downloads.1password.com/mac/1Password-8.10.72-x86_64.zip", + "hash": "sha256-SijXMG33quuxip2JOkjyB9ITSm9livqXzBPbqMmLVns=" }, "aarch64-darwin": { - "url": "https://downloads.1password.com/mac/1Password-8.10.70-aarch64.zip", - "hash": "sha256-f9b8L4S6CToMukeqrW3EKXAov0rqEMsIpZEGrvDQmg8=" + "url": "https://downloads.1password.com/mac/1Password-8.10.72-aarch64.zip", + "hash": "sha256-y4kK4tL9NjvUT/C6q7WxaX/7LOCr3xkRJTBhqw2jjtQ=" } }, "beta": { diff --git a/pkgs/applications/misc/1password-gui/versions.json b/pkgs/applications/misc/1password-gui/versions.json index 3314aea3f031..e8a8b868bd07 100644 --- a/pkgs/applications/misc/1password-gui/versions.json +++ b/pkgs/applications/misc/1password-gui/versions.json @@ -1,6 +1,6 @@ { - "stable-linux": "8.10.70", - "stable-darwin": "8.10.70", + "stable-linux": "8.10.72", + "stable-darwin": "8.10.72", "beta-linux":"8.10.70-24.BETA", "beta-darwin": "8.10.70-24.BETA" } diff --git a/pkgs/applications/networking/browsers/chromium/info.json b/pkgs/applications/networking/browsers/chromium/info.json index bc38c109d23a..76ab98a318d7 100644 --- a/pkgs/applications/networking/browsers/chromium/info.json +++ b/pkgs/applications/networking/browsers/chromium/info.json @@ -1,10 +1,10 @@ { "chromium": { - "version": "135.0.7049.84", + "version": "135.0.7049.95", "chromedriver": { - "version": "135.0.7049.85", - "hash_darwin": "sha256-L4x/MSCbVt2UIQwbHREDV8br6DmdfuqTJ3//7opK2IU=", - "hash_darwin_aarch64": "sha256-vixXGqbc2UYpydg1RILhrtmr5DdbJ5I1sD8aNikejQU=" + "version": "135.0.7049.96", + "hash_darwin": "sha256-MmL/hQGPk/kGBtbXSekE+lHktucPCv3HFr8VYTnff5w=", + "hash_darwin_aarch64": "sha256-TGiVrAYgeLGniGBZ2dHUBk6Hg996ouBSJHZm9hXExQ4=" }, "deps": { "depot_tools": { @@ -20,8 +20,8 @@ "DEPS": { "src": { "url": "https://chromium.googlesource.com/chromium/src.git", - "rev": "6c019e56001911b3fd467e03bf68c435924d62f4", - "hash": "sha256-BFw1o2cIHBeBudeigH6YTOuLGsp/+pTOeE1lXBO3aio=", + "rev": "de2eb485a1951079e63bdb57ce25544d2dc79c15", + "hash": "sha256-6ydyJWsDawt0bfYAFHotTB9ujmIYsqUUpNwB6q6RNQE=", "recompress": true }, "src/third_party/clang-format/script": { @@ -566,8 +566,8 @@ }, "src/third_party/pdfium": { "url": "https://pdfium.googlesource.com/pdfium.git", - "rev": "9afffebfa895ea6cdcc05516908c50bd7fe72797", - "hash": "sha256-89rJdhwUJtJCMO7FvVoTYO80swFRkoWUB/ZYs1tOLzE=" + "rev": "2919d07ee57020e3e4b66cce45c61104d80304d2", + "hash": "sha256-zE6a0R8NZ3SE0bHwPan3dTh5kmq5JmYTbDQIvyNICeg=" }, "src/third_party/perfetto": { "url": "https://android.googlesource.com/platform/external/perfetto.git", @@ -616,8 +616,8 @@ }, "src/third_party/skia": { "url": "https://skia.googlesource.com/skia.git", - "rev": "6e445bdea696eb6b6a46681dfc1a63edaa517edb", - "hash": "sha256-mSup6nKsEPjJ/HBV7PwjBI4PP7/RdwFm/dnavKeRqzI=" + "rev": "5a44cdd70f04aa65fa063caa1a7e3028d75236f8", + "hash": "sha256-QX3b+S0IuxJKmlMudL6420+bXRhDkWYC7GNRKxKNm8A=" }, "src/third_party/smhasher/src": { "url": "https://chromium.googlesource.com/external/smhasher.git", @@ -787,7 +787,7 @@ } }, "ungoogled-chromium": { - "version": "135.0.7049.84", + "version": "135.0.7049.95", "deps": { "depot_tools": { "rev": "85ec2718b5a29990c7eb67778348c9f76a00f392", @@ -798,16 +798,16 @@ "hash": "sha256-8NynNvLNCHxy8EYmsnPovKhXu9DcDcYBhg4A6d2QIfY=" }, "ungoogled-patches": { - "rev": "135.0.7049.84-1", - "hash": "sha256-Cncp+sLFWC8nuepXCbkeHZYgAw2cFIAIaQe9wgun/AA=" + "rev": "135.0.7049.95-1", + "hash": "sha256-kLLtJti5GIF9TT0cH8zvsxywJzD22X8u2bB/tqENSjo=" }, "npmHash": "sha256-wNrZaugdKJCyV1WchkKXzr/I1OW1AtjiC2p7qTZZOqU=" }, "DEPS": { "src": { "url": "https://chromium.googlesource.com/chromium/src.git", - "rev": "6c019e56001911b3fd467e03bf68c435924d62f4", - "hash": "sha256-BFw1o2cIHBeBudeigH6YTOuLGsp/+pTOeE1lXBO3aio=", + "rev": "de2eb485a1951079e63bdb57ce25544d2dc79c15", + "hash": "sha256-6ydyJWsDawt0bfYAFHotTB9ujmIYsqUUpNwB6q6RNQE=", "recompress": true }, "src/third_party/clang-format/script": { @@ -1352,8 +1352,8 @@ }, "src/third_party/pdfium": { "url": "https://pdfium.googlesource.com/pdfium.git", - "rev": "9afffebfa895ea6cdcc05516908c50bd7fe72797", - "hash": "sha256-89rJdhwUJtJCMO7FvVoTYO80swFRkoWUB/ZYs1tOLzE=" + "rev": "2919d07ee57020e3e4b66cce45c61104d80304d2", + "hash": "sha256-zE6a0R8NZ3SE0bHwPan3dTh5kmq5JmYTbDQIvyNICeg=" }, "src/third_party/perfetto": { "url": "https://android.googlesource.com/platform/external/perfetto.git", @@ -1402,8 +1402,8 @@ }, "src/third_party/skia": { "url": "https://skia.googlesource.com/skia.git", - "rev": "6e445bdea696eb6b6a46681dfc1a63edaa517edb", - "hash": "sha256-mSup6nKsEPjJ/HBV7PwjBI4PP7/RdwFm/dnavKeRqzI=" + "rev": "5a44cdd70f04aa65fa063caa1a7e3028d75236f8", + "hash": "sha256-QX3b+S0IuxJKmlMudL6420+bXRhDkWYC7GNRKxKNm8A=" }, "src/third_party/smhasher/src": { "url": "https://chromium.googlesource.com/external/smhasher.git", diff --git a/pkgs/applications/networking/cluster/linkerd/edge.nix b/pkgs/applications/networking/cluster/linkerd/edge.nix index 877a33aec8c5..4ae752d29272 100644 --- a/pkgs/applications/networking/cluster/linkerd/edge.nix +++ b/pkgs/applications/networking/cluster/linkerd/edge.nix @@ -2,7 +2,7 @@ (callPackage ./generic.nix { }) { channel = "edge"; - version = "25.4.1"; - sha256 = "18hv0lfh1ldy7chjs2ssn62crn71a0mvvn1g8b35l91g8mqyh4ry"; - vendorHash = "sha256-vKehadl94okOd1YfaETgdQwWr8F2gOPGyjzzTjxKyLA="; + version = "25.4.2"; + sha256 = "0i0z2x9x2sf9lpkvw9pnvwp74hxm9rqbdhx9v91qwlsnw8clc950"; + vendorHash = "sha256-jIL/08mSvz6xLlB1Iyj2F9vnfOkadeYf92CeXXx0Otw="; } diff --git a/pkgs/applications/networking/cluster/roxctl/default.nix b/pkgs/applications/networking/cluster/roxctl/default.nix index e10ba0c7e28f..fb3dd504386d 100644 --- a/pkgs/applications/networking/cluster/roxctl/default.nix +++ b/pkgs/applications/networking/cluster/roxctl/default.nix @@ -9,16 +9,16 @@ buildGoModule rec { pname = "roxctl"; - version = "4.7.1"; + version = "4.7.2"; src = fetchFromGitHub { owner = "stackrox"; repo = "stackrox"; rev = version; - sha256 = "sha256-AQaMWpI7kFFotEQa536dqKxuP/mHuzNm75RPqUWw1VY="; + sha256 = "sha256-W4g7//0r+XO1l6WoWm55pZAvyTsHNNI3kwBNvNvP+vw="; }; - vendorHash = "sha256-v2aLKU6FBkJqenWzftKmngeXvQBPR03RPR0WcmOiYD0="; + vendorHash = "sha256-eTxcJnAZUKk6VDQhbjxnsiQWEpM2jA228SAhrCqjbF4="; nativeBuildInputs = [ installShellFiles ]; diff --git a/pkgs/applications/networking/cluster/terraform-providers/providers.json b/pkgs/applications/networking/cluster/terraform-providers/providers.json index f91c3b75078a..0b837fd3106e 100644 --- a/pkgs/applications/networking/cluster/terraform-providers/providers.json +++ b/pkgs/applications/networking/cluster/terraform-providers/providers.json @@ -225,13 +225,13 @@ "vendorHash": "sha256-OqbnkuEy9w6F1DxmlYhRNYhBaYhWV0FtMK4wdwSybh8=" }, "checkly": { - "hash": "sha256-gpCE4W35h/3FBLVTM1o038lDB3dgjIwDs8mXjep07RM=", + "hash": "sha256-0PUapBId0y6R5a3+mTN/p57S3ZrkaB4NDFTO77B/QTY=", "homepage": "https://registry.terraform.io/providers/checkly/checkly", "owner": "checkly", "repo": "terraform-provider-checkly", - "rev": "v1.10.1", + "rev": "v1.11.0", "spdx": null, - "vendorHash": "sha256-FaqXLFc7ew7HgCZghNPm4sgmsm25/qMAqhqUtbduccU=" + "vendorHash": "sha256-mhuNDKTzkL6rWdoL54qt1s8lPMFMsRNNoFBGi5i9ksk=" }, "ciscoasa": { "hash": "sha256-xzc44FEy2MPo51Faq/VFwg411JK9e0kQucpt0vdN8yg=", @@ -243,22 +243,22 @@ "vendorHash": null }, "cloudamqp": { - "hash": "sha256-N+ci49HQq5TMQo7XstYar8SrdOO5tQb92o+R/9LfX3s=", + "hash": "sha256-nUzWtow4FLQzGoxGWA68LAs4Nau7xTdtxATSwsF6s9c=", "homepage": "https://registry.terraform.io/providers/cloudamqp/cloudamqp", "owner": "cloudamqp", "repo": "terraform-provider-cloudamqp", - "rev": "v1.32.3", + "rev": "v1.33.0", "spdx": "MPL-2.0", - "vendorHash": "sha256-lQrtAU8zbeIGplfC8+017Ib9d4MFVF0pMvxmE3MLt3M=" + "vendorHash": "sha256-nbz0QEIfnLnMOE/zGILMVBK+/hjYLlWeIqiwOLP6ebQ=" }, "cloudflare": { - "hash": "sha256-5L5fnJCQU2gcXbbUq8KDid8NhedFXyYBgysggPxNxSY=", + "hash": "sha256-FPZBU93x82+szFCC8djO88WFedbsVRFlVxZfTf4uAxI=", "homepage": "https://registry.terraform.io/providers/cloudflare/cloudflare", "owner": "cloudflare", "repo": "terraform-provider-cloudflare", - "rev": "v5.2.0", + "rev": "v5.3.0", "spdx": "Apache-2.0", - "vendorHash": "sha256-vh31Teu4PruX3i7EIlfumOn/R6libKzAxMPqhTxqBTA=" + "vendorHash": "sha256-4iDZXMz3GN7vSAXyDtvGL77ChAjJ/2H7PD/AvYi4BMA=" }, "cloudfoundry": { "hash": "sha256-1nYncJLVU/f9WD6Quh9IieIXgixPzbPk4zbtI1zmf9g=", @@ -381,22 +381,22 @@ "vendorHash": "sha256-osSB88Xzvt5DTDE0AY2+QuKClfbGIVJNrXuy4Cbk1Tg=" }, "dnsimple": { - "hash": "sha256-ZKi8+EYLW/Pey0EHTKY0ly7+2Y13mqxMhGia6UUdEtI=", + "hash": "sha256-CkfgHBNtYCFZIMoXpX0ivkm1dyIs4mKSrHaiQ3qt/+w=", "homepage": "https://registry.terraform.io/providers/dnsimple/dnsimple", "owner": "dnsimple", "repo": "terraform-provider-dnsimple", - "rev": "v1.8.0", + "rev": "v1.9.0", "spdx": "MPL-2.0", - "vendorHash": "sha256-HBwyjqKSshB4Nl2e/xnMnWgYVolSxvKZHi+bYfM2+Ho=" + "vendorHash": "sha256-WZqwBkVXoFmDikIyt9GWszLA/9YBoQHAdBuWbGKZBZw=" }, "docker": { - "hash": "sha256-UyHOI8C0eDV5YllAi9clHp/CEldHjIp3FHHMPy1rK58=", + "hash": "sha256-0GMZnrmuRKWnI3Fu97MPtKiNh9XSUkFO/U35+ym2xLk=", "homepage": "https://registry.terraform.io/providers/kreuzwerker/docker", "owner": "kreuzwerker", "repo": "terraform-provider-docker", - "rev": "v3.0.2", + "rev": "v3.1.2", "spdx": "MPL-2.0", - "vendorHash": "sha256-XxltOTtCgmJ9wZX8Yw39HkwVVZb58kZjAH7jfKPhjKM=" + "vendorHash": "sha256-YTxWawv5KbitMD9CoiDLt8FjZUvjyIjcoqQVmz9xZGs=" }, "doppler": { "hash": "sha256-VzdtksB/zrsf3z3J/1UEehiuQYM7cyxTef892PGYrxo=", @@ -678,13 +678,13 @@ "vendorHash": null }, "jetstream": { - "hash": "sha256-RlYl8DNx+XjLjMQ8CbVJH0p2ZwBrDNp2OCvzHxQ7zLA=", + "hash": "sha256-N/cKiMwPHo8581PFg06RjgOGpGB02/CCARTIFu9kH3s=", "homepage": "https://registry.terraform.io/providers/nats-io/jetstream", "owner": "nats-io", "repo": "terraform-provider-jetstream", - "rev": "v0.1.1", + "rev": "v0.2.0", "spdx": "Apache-2.0", - "vendorHash": "sha256-NEGjgtrn6ZowqSF6NAK1NnSjYVUvfWuH/4R5ZPdTZSs=" + "vendorHash": "sha256-Dd02Ikt51eh/FBEtswe8Qr6P5tgQFZJTKgO01gxPX3s=" }, "kafka": { "hash": "sha256-O8fD974eEmIgMAbLsENBkHiS1+2onx7OOrhnwv+cGoo=", @@ -750,13 +750,13 @@ "vendorHash": "sha256-fP6brpY/wRI1Yjgapzi+FfOci65gxWeOZulXbGdilrE=" }, "linode": { - "hash": "sha256-7CGut0z0NEu4yeJOCbqgL9CH7uDwGQbUKTnPK62Xbp0=", + "hash": "sha256-yMLX72T2TG1wyGrn0pmpgPFPNVIVMSkiqAAl3OAvEuA=", "homepage": "https://registry.terraform.io/providers/linode/linode", "owner": "linode", "repo": "terraform-provider-linode", - "rev": "v2.36.0", + "rev": "v2.37.0", "spdx": "MPL-2.0", - "vendorHash": "sha256-nrZNJZHb1FJ7csM/C3mR+RUYy/2TeUzQ1sDmQ8Q4F/s=" + "vendorHash": "sha256-hp2gtyC+AXlsbYJlloDnRRvbaF1s/cAc2XIniKdUf08=" }, "linuxbox": { "hash": "sha256-svQRz1/PdVLpHoxOam1sfRTwHqgqs4ohJQs3IPMMAM4=", @@ -858,13 +858,13 @@ "vendorHash": null }, "newrelic": { - "hash": "sha256-wh/6nkBtmZb+nwwGpk4F/YlSbmSFgCjMprnMmXslWHg=", + "hash": "sha256-ybOBWUxboRw+KTnWcDPPXo/oZVJs4qyWEekYoIB8bsI=", "homepage": "https://registry.terraform.io/providers/newrelic/newrelic", "owner": "newrelic", "repo": "terraform-provider-newrelic", - "rev": "v3.60.0", + "rev": "v3.60.2", "spdx": "MPL-2.0", - "vendorHash": "sha256-9E1I7ZgBwFo7XouQjBkQQVxQKvkwE6dhVF1hZxec+WY=" + "vendorHash": "sha256-WmrqA3wVUStJunm1eiftKekHJaPRvCAua5guqskd6CE=" }, "nexus": { "hash": "sha256-6RPga80ZoqEEFL7I2OVXcrwaxbdhSzZDEV07xL07rZs=", @@ -913,11 +913,11 @@ "vendorHash": "sha256-LRIfxQGwG988HE5fftGl6JmBG7tTknvmgpm4Fu1NbWI=" }, "oci": { - "hash": "sha256-UG2dXoHHH7sWma4+Zlvtj2aHwcvJPKgTxJFZDxqzKyc=", + "hash": "sha256-S3OsFoSPYOcD+mjOy1gBAVGpqd61G5S2Zl2GGknKA5o=", "homepage": "https://registry.terraform.io/providers/oracle/oci", "owner": "oracle", "repo": "terraform-provider-oci", - "rev": "v6.32.0", + "rev": "v6.34.0", "spdx": "MPL-2.0", "vendorHash": null }, @@ -1003,11 +1003,11 @@ "vendorHash": null }, "pagerduty": { - "hash": "sha256-ed4i9Esj90h4bG4gzGZBqaaJJOsE2fLfip9xyneRAjg=", + "hash": "sha256-7C1oVVLrv1yoBVngUdBAjjLrGeaQhbiLp/g+5danDo4=", "homepage": "https://registry.terraform.io/providers/PagerDuty/pagerduty", "owner": "PagerDuty", "repo": "terraform-provider-pagerduty", - "rev": "v3.23.1", + "rev": "v3.24.0", "spdx": "MPL-2.0", "vendorHash": null }, @@ -1282,13 +1282,13 @@ "vendorHash": "sha256-L+XwC7c4ph4lM0+BhHB9oi1R/Av8jlDcqHewOmtPU1s=" }, "tailscale": { - "hash": "sha256-I9t8HyLZmY98g/XjTy6JEryJ8ZOXfegnbymmxVwsy7Q=", + "hash": "sha256-1fHY1eU+8z48j485VONdCsKJWC5hOVbph2pOVGHjYjo=", "homepage": "https://registry.terraform.io/providers/tailscale/tailscale", "owner": "tailscale", "repo": "terraform-provider-tailscale", - "rev": "v0.18.0", + "rev": "v0.19.0", "spdx": "MIT", - "vendorHash": "sha256-bfcsqBusN311oncfCViG4aWy9rylvhrcjs/WUSbh4dI=" + "vendorHash": "sha256-X2YjJvMboS04ViaIP1ebzIX8txumlvTEpGmEAlZNV9E=" }, "talos": { "hash": "sha256-49woELLSpheuyGnXuwamZwsHdOfjwSB4v8/INzSrMRU=", diff --git a/pkgs/build-support/dotnet/auto-patchcil-hook/auto-patchcil.sh b/pkgs/build-support/dotnet/auto-patchcil-hook/auto-patchcil.sh new file mode 100644 index 000000000000..898ad68cb969 --- /dev/null +++ b/pkgs/build-support/dotnet/auto-patchcil-hook/auto-patchcil.sh @@ -0,0 +1,118 @@ +#!@shell@ +# shellcheck shell=bash + +declare -a autoPatchcilLibs +declare -a extraAutoPatchcilLibs + +gatherLibraries() { + if [ -d "$1/lib" ]; then + autoPatchcilLibs+=("$1/lib") + fi +} + +addEnvHooks "${targetOffset:?}" gatherLibraries + +# Can be used to manually add additional directories with shared object files +# to be included for the next autoPatchcil invocation. +addAutoPatchcilSearchPath() { + local -a findOpts=() + + while [ $# -gt 0 ]; do + case "$1" in + --) + shift + break + ;; + --no-recurse) + shift + findOpts+=("-maxdepth" 1) + ;; + --*) + echo "addAutoPatchcilSearchPath: ERROR: Invalid command line" \ + "argument: $1" >&2 + return 1 + ;; + *) break ;; + esac + done + + local dir= + while IFS= read -r -d '' dir; do + extraAutoPatchcilLibs+=("$dir") + done < <( + find "$@" "${findOpts[@]}" \! -type d \ + \( -name '*.so' -o -name '*.so.*' \) -print0 | + sed -z 's#/[^/]*$##' | + uniq -z + ) +} + +autoPatchcil() { + local rid= + local norecurse= + while [ $# -gt 0 ]; do + case "$1" in + --) + shift + break + ;; + --rid) + rid="$2" + shift 2 + ;; + --no-recurse) + shift + norecurse=1 + ;; + --*) + echo "autoPatchcil: ERROR: Invalid command line" \ + "argument: $1" >&2 + return 1 + ;; + *) break ;; + esac + done + + if [ -z "$rid" ]; then + echo "autoPatchcil: ERROR: No RID (Runtime ID) provided." >&2 + return 1 + fi + + local ignoreMissingDepsArray=("--ignore-missing") + concatTo ignoreMissingDepsArray autoPatchcilIgnoreMissingDeps + + if [ ${#ignoreMissingDepsArray[@]} -lt 2 ]; then + ignoreMissingDepsArray=() + fi + + local autoPatchcilFlags=( + ${norecurse:+--no-recurse} + --rid "$rid" + "${ignoreMissingDepsArray[@]}" + --paths "$@" + --libs "${autoPatchcilLibs[@]}" + ) + + # shellcheck disable=SC2016 + echoCmd 'patchcil auto flags' "${autoPatchcilFlags[@]}" + @patchcil@ auto "${autoPatchcilFlags[@]}" +} + +autoPatchcilFixupOutput() { + if [[ -z "${dontAutoPatchcil-}" ]]; then + if [ -n "${dotnetRuntimeIds+x}" ]; then + if [[ -n $__structuredAttrs ]]; then + local dotnetRuntimeIdsArray=("${dotnetRuntimeIds[@]}") + else + # shellcheck disable=SC2206 # Intentionally expanding it to preserve old behavior + local dotnetRuntimeIdsArray=($dotnetRuntimeIds) + fi + else + local dotnetRuntimeIdsArray=("") + fi + + autoPatchcil --rid "${autoPatchcilRuntimeId:-${dotnetRuntimeIdsArray[0]}}" -- "${prefix:?}" + fi +} + +fixupOutputHooks+=(autoPatchcilFixupOutput) diff --git a/pkgs/build-support/dotnet/auto-patchcil-hook/default.nix b/pkgs/build-support/dotnet/auto-patchcil-hook/default.nix new file mode 100644 index 000000000000..cbe9105e6115 --- /dev/null +++ b/pkgs/build-support/dotnet/auto-patchcil-hook/default.nix @@ -0,0 +1,14 @@ +{ + lib, + bash, + patchcil, + makeSetupHook, +}: + +makeSetupHook { + name = "auto-patchcil-hook"; + substitutions = { + shell = lib.getExe bash; + patchcil = lib.getExe patchcil; + }; +} ./auto-patchcil.sh diff --git a/pkgs/by-name/ae/aerospace/package.nix b/pkgs/by-name/ae/aerospace/package.nix index a151e3890841..82f4dee258c5 100644 --- a/pkgs/by-name/ae/aerospace/package.nix +++ b/pkgs/by-name/ae/aerospace/package.nix @@ -9,7 +9,7 @@ let appName = "AeroSpace.app"; - version = "0.17.1-Beta"; + version = "0.18.2-Beta"; in stdenv.mkDerivation { pname = "aerospace"; @@ -18,7 +18,7 @@ stdenv.mkDerivation { src = fetchzip { url = "https://github.com/nikitabobko/AeroSpace/releases/download/v${version}/AeroSpace-v${version}.zip"; - sha256 = "sha256-IMU0s57dpes7Vm2Wv191LwkRgiF+ZIqNWHzrl4a1Pm0="; + sha256 = "sha256-/Fc4Zk8KvAdaKXyHmeL9nh79CAQLx/Y6URFWIOL5YyQ="; }; nativeBuildInputs = [ installShellFiles ]; diff --git a/pkgs/by-name/al/alibuild/package.nix b/pkgs/by-name/al/alibuild/package.nix new file mode 100644 index 000000000000..d9315f52f68c --- /dev/null +++ b/pkgs/by-name/al/alibuild/package.nix @@ -0,0 +1,42 @@ +{ + lib, + python3Packages, + fetchPypi, +}: + +python3Packages.buildPythonApplication rec { + pname = "alibuild"; + version = "1.17.18"; + pyproject = true; + + src = fetchPypi { + inherit pname version; + hash = "sha256-771XCMYNJsQzD7rb/7q5rheeIL8X2bvMWwLkA40CJ9Y="; + }; + + build-system = with python3Packages; [ + setuptools + setuptools-scm + ]; + + nativeBuildInputs = with python3Packages; [ pip ]; + + dependencies = with python3Packages; [ + requests + pyyaml + boto3 + jinja2 + distro + ]; + + pythonRelaxDeps = [ "boto3" ]; + + doCheck = false; + + meta = { + homepage = "https://alisw.github.io/alibuild/"; + description = "Build tool for ALICE experiment software"; + license = lib.licenses.gpl3; + maintainers = with lib.maintainers; [ ktf ]; + }; +} diff --git a/pkgs/by-name/as/asusctl/package.nix b/pkgs/by-name/as/asusctl/package.nix index 3b4a0344be8f..edaff5e252cf 100644 --- a/pkgs/by-name/as/asusctl/package.nix +++ b/pkgs/by-name/as/asusctl/package.nix @@ -17,17 +17,17 @@ }: rustPlatform.buildRustPackage rec { pname = "asusctl"; - version = "6.1.10"; + version = "6.1.12"; src = fetchFromGitLab { owner = "asus-linux"; repo = "asusctl"; rev = version; - hash = "sha256-KCGoaqqXWFApD464jbNcdGhd7DDxrpNcRg/ClM0GrJc="; + hash = "sha256-E/tDd7wQKDgC91x1rGa8Ltn4GMPk3DJDvmMQNafVLyM="; }; useFetchCargoVendor = true; - cargoHash = "sha256-c3uoQWdf4nG2SzLpB/T7AM/wrfxqVZcTVX1eRFZTGhQ="; + cargoHash = "sha256-lvm3xvI01RyaSS39nm3l7Zpn3x23DDBQr+0Gggl4p9U="; postPatch = '' files=" diff --git a/pkgs/by-name/au/autokbisw/nix/default.nix b/pkgs/by-name/au/autokbisw/nix/default.nix new file mode 100644 index 000000000000..ef16085c27f5 --- /dev/null +++ b/pkgs/by-name/au/autokbisw/nix/default.nix @@ -0,0 +1,7 @@ +# This file was generated by swiftpm2nix. +{ + workspaceStateFile = ./workspace-state.json; + hashes = { + "swift-argument-parser" = "sha256-FSIi4jDX7R35jDHkKzQFJLl4K0Hdx9UWgwxJbHVpsYU="; + }; +} diff --git a/pkgs/by-name/au/autokbisw/nix/workspace-state.json b/pkgs/by-name/au/autokbisw/nix/workspace-state.json new file mode 100644 index 000000000000..67db53fa95f3 --- /dev/null +++ b/pkgs/by-name/au/autokbisw/nix/workspace-state.json @@ -0,0 +1,25 @@ +{ + "object": { + "artifacts": [], + "dependencies": [ + { + "basedOn": null, + "packageRef": { + "identity": "swift-argument-parser", + "kind": "remoteSourceControl", + "location": "https://github.com/apple/swift-argument-parser", + "name": "swift-argument-parser" + }, + "state": { + "checkoutState": { + "revision": "e1465042f195f374b94f915ba8ca49de24300a0d", + "version": "1.0.2" + }, + "name": "sourceControlCheckout" + }, + "subpath": "swift-argument-parser" + } + ] + }, + "version": 6 +} diff --git a/pkgs/by-name/au/autokbisw/package.nix b/pkgs/by-name/au/autokbisw/package.nix new file mode 100644 index 000000000000..76b601b2ae24 --- /dev/null +++ b/pkgs/by-name/au/autokbisw/package.nix @@ -0,0 +1,45 @@ +{ + fetchFromGitHub, + lib, + swift, + swiftPackages, + swiftpm, + swiftpm2nix, +}: +let + # Nix dir generated by running `swiftpm2nix` in the upstream project + generated = swiftpm2nix.helpers ./nix; +in +swiftPackages.stdenv.mkDerivation rec { + pname = "autokbisw"; + version = "2.0.1"; + src = fetchFromGitHub { + owner = "ohueter"; + repo = "autokbisw"; + tag = version; + hash = "sha256-xNXXgDLWW8pdik3STmhpZATf9REd+8IGeoX/oxGg4vc="; + }; + nativeBuildInputs = [ + swift + swiftpm + ]; + configurePhase = generated.configure; + installPhase = '' + runHook preInstall + + mkdir -p $out/bin + cp $(swiftpmBinPath)/autokbisw $out/bin/ + + runHook postInstall + ''; + + meta = { + description = "Automatic keyboard input language switching for macOS"; + homepage = "https://github.com/ohueter/autokbisw"; + changelog = "https://github.com/ohueter/autokbisw/releases/tag/${version}"; + license = lib.licenses.asl20; + mainProgram = "autokbisw"; + maintainers = with lib.maintainers; [ craigf ]; + platforms = lib.platforms.darwin; + }; +} diff --git a/pkgs/by-name/ba/babl/package.nix b/pkgs/by-name/ba/babl/package.nix index bfccb384280f..e99f319fb7e5 100644 --- a/pkgs/by-name/ba/babl/package.nix +++ b/pkgs/by-name/ba/babl/package.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "babl"; - version = "0.1.110"; + version = "0.1.112"; outputs = [ "out" @@ -23,7 +23,7 @@ stdenv.mkDerivation (finalAttrs: { src = fetchurl { url = "https://download.gimp.org/pub/babl/${lib.versions.majorMinor finalAttrs.version}/babl-${finalAttrs.version}.tar.xz"; - hash = "sha256-v0e+dUDWJ1OJ9mQx7wMGTfU3YxXiQ9C6tEjGqnE/V0M="; + hash = "sha256-+2lmgkIXh8j+zIPoqrSBId7I7jjRGbZSkc/L4xUCink="; }; patches = [ diff --git a/pkgs/by-name/be/beatprints/package.nix b/pkgs/by-name/be/beatprints/package.nix new file mode 100644 index 000000000000..90e90c64d91e --- /dev/null +++ b/pkgs/by-name/be/beatprints/package.nix @@ -0,0 +1,51 @@ +{ + lib, + python3Packages, + fetchFromGitHub, +}: +python3Packages.buildPythonApplication rec { + pname = "BeatPrints"; + version = "1.1.4"; + pyproject = true; + + src = fetchFromGitHub { + owner = "TrueMyst"; + repo = "BeatPrints"; + rev = "v${version}"; + hash = "sha256-HtYPEnHbJarSC3P337l3IGagk62FgEohSAVyv6PBnIs="; + }; + + build-system = with python3Packages; [ + poetry-core + ]; + + pythonRelaxDeps = [ + "Pillow" + "rich" + ]; + + dependencies = with python3Packages; [ + requests + pylette + lrclibapi + fonttools + questionary + rich + toml + pillow + spotipy + ]; + + meta = with lib; { + description = "Create eye-catching, Pinterest-style music posters effortlessly"; + longDescription = '' + Create eye-catching, Pinterest-style music posters effortlessly. BeatPrints integrates with Spotify and LRClib API to help you design custom posters for your favorite tracks or albums. 🍀 + ''; + homepage = "https://beatprints.readthedocs.io"; + changelog = "https://github.com/TrueMyst/BeatPrints/releases/tag/v${version}"; + mainProgram = "beatprints"; + license = licenses.cc-by-nc-sa-40; + maintainers = with maintainers; [ DataHearth ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/by-name/bl/blobfuse/package.nix b/pkgs/by-name/bl/blobfuse/package.nix index 2eb2b7b2a6ba..6de880843121 100644 --- a/pkgs/by-name/bl/blobfuse/package.nix +++ b/pkgs/by-name/bl/blobfuse/package.nix @@ -9,19 +9,19 @@ }: let - version = "2.4.1"; + version = "2.4.2"; src = fetchFromGitHub { owner = "Azure"; repo = "azure-storage-fuse"; rev = "blobfuse2-${version}"; - sha256 = "sha256-QCrBsEh8o4GblCWNcJssm9c6uSQYVs+qrdzfmI9l278="; + sha256 = "sha256-bpMX7flbb/QYZUtq1I1s2lAvrBhW7esPwxN/JupryDo="; }; in buildGoModule { pname = "blobfuse"; inherit version src; - vendorHash = "sha256-ZzpstCTABL9x5NM5tTiWZqOfI+BSKGZfb+ahbFUmcdo="; + vendorHash = "sha256-uWesaZshuBVf4yJiX6YqNMr0GiBkrHhOqefnCrpPCHg="; buildInputs = [ fuse3 ]; diff --git a/pkgs/by-name/ca/cargo-nextest/package.nix b/pkgs/by-name/ca/cargo-nextest/package.nix index 2cd4adad6ebf..4c4202a7f969 100644 --- a/pkgs/by-name/ca/cargo-nextest/package.nix +++ b/pkgs/by-name/ca/cargo-nextest/package.nix @@ -7,17 +7,17 @@ rustPlatform.buildRustPackage rec { pname = "cargo-nextest"; - version = "0.9.93"; + version = "0.9.94"; src = fetchFromGitHub { owner = "nextest-rs"; repo = "nextest"; rev = "cargo-nextest-${version}"; - hash = "sha256-MH3OPEap56GYT/84wlmDp7B/v45TgyW6KQLTJXHy5wI="; + hash = "sha256-r1Q4/CQwu4FRiymKacmg9SfM/sqagtzNF904TbjaB4c="; }; useFetchCargoVendor = true; - cargoHash = "sha256-7Re6TcHYhwFp4cj/KzJXpL0taH6X/S63lgAW5rtSrZk="; + cargoHash = "sha256-OXxmJcARh94lYxlRgv1fCCifYJwrWaQ21UxRNWI2yFw="; cargoBuildFlags = [ "-p" diff --git a/pkgs/by-name/ca/cargo-shear/package.nix b/pkgs/by-name/ca/cargo-shear/package.nix index f35310fe2f32..c342579c0b44 100644 --- a/pkgs/by-name/ca/cargo-shear/package.nix +++ b/pkgs/by-name/ca/cargo-shear/package.nix @@ -6,7 +6,7 @@ cargo-shear, }: let - version = "1.1.12"; + version = "1.1.14"; in rustPlatform.buildRustPackage { pname = "cargo-shear"; @@ -16,11 +16,11 @@ rustPlatform.buildRustPackage { owner = "Boshen"; repo = "cargo-shear"; rev = "v${version}"; - hash = "sha256-FvZJ0RFa5b9BQuZ1fmkvJhZj59yAsKSkKoTE0Emzdos="; + hash = "sha256-xGNIk/9UYU1F/Qj2tGvBb5rEZWjVoTyzk23OJE6seps="; }; useFetchCargoVendor = true; - cargoHash = "sha256-sYRUyTdTT2+VJHuiY1apom+EQU1hR46fJ6TmwNapHb4="; + cargoHash = "sha256-olnkcA9Vt1+yFzL2ntfDmO4rzMuJ0JjJVqCl15xcdDI="; # https://github.com/Boshen/cargo-shear/blob/a0535415a3ea94c86642f39f343f91af5cdc3829/src/lib.rs#L20-L23 SHEAR_VERSION = version; diff --git a/pkgs/by-name/ch/checkov/package.nix b/pkgs/by-name/ch/checkov/package.nix index c983161978f3..9d8ecd252ad2 100644 --- a/pkgs/by-name/ch/checkov/package.nix +++ b/pkgs/by-name/ch/checkov/package.nix @@ -25,14 +25,14 @@ with py.pkgs; python3.pkgs.buildPythonApplication rec { pname = "checkov"; - version = "3.2.404"; + version = "3.2.405"; pyproject = true; src = fetchFromGitHub { owner = "bridgecrewio"; repo = "checkov"; tag = version; - hash = "sha256-hxu2FAdLMm54b0SNiHcvdKgxmsDZtA9qEqD/c9vL3Yg="; + hash = "sha256-bzHd1gR2YmTyM4D8+Ux8eCEUynN5qu4B/dAGZ6cHXYA="; }; pythonRelaxDeps = [ diff --git a/pkgs/by-name/cl/clickable/package.nix b/pkgs/by-name/cl/clickable/package.nix index 741103455c39..ba25c7e69d2d 100644 --- a/pkgs/by-name/cl/clickable/package.nix +++ b/pkgs/by-name/cl/clickable/package.nix @@ -8,13 +8,13 @@ python3Packages.buildPythonApplication rec { pname = "clickable"; - version = "8.3.0"; + version = "8.3.1"; src = fetchFromGitLab { owner = "clickable"; repo = "clickable"; rev = "v${version}"; - hash = "sha256-5fymmsZUYwB+wc1X7Y1HwwJbGRjQPwkk9JLTxnfH8fo="; + hash = "sha256-Vn2PyALaRrE+jJRdZzW+jjCm3f2GfpgrQcFGB7kr4EM="; }; propagatedBuildInputs = with python3Packages; [ diff --git a/pkgs/by-name/cl/clickhouse-backup/package.nix b/pkgs/by-name/cl/clickhouse-backup/package.nix index 5ffa4cf9151c..dd186b8ec8f9 100644 --- a/pkgs/by-name/cl/clickhouse-backup/package.nix +++ b/pkgs/by-name/cl/clickhouse-backup/package.nix @@ -8,13 +8,13 @@ buildGoModule rec { pname = "clickhouse-backup"; - version = "2.6.13"; + version = "2.6.15"; src = fetchFromGitHub { owner = "Altinity"; repo = "clickhouse-backup"; rev = "v${version}"; - hash = "sha256-8yvhDpSOklkWIi10o0QBd8bUB9qOF+nDhgaOD8G5FqU="; + hash = "sha256-WHIrgKWO8yHHbQ5i3qvCYjxuRPj8sRasjxQ2J1N8q7o="; }; vendorHash = "sha256-4qPZihOuaD8lKF31fhyTDG7gBa0gExLVavazGZWDyAk="; diff --git a/pkgs/by-name/cn/cnquery/package.nix b/pkgs/by-name/cn/cnquery/package.nix index caa454547a5f..1011182dd86b 100644 --- a/pkgs/by-name/cn/cnquery/package.nix +++ b/pkgs/by-name/cn/cnquery/package.nix @@ -6,18 +6,18 @@ buildGoModule rec { pname = "cnquery"; - version = "11.48.0"; + version = "11.49.0"; src = fetchFromGitHub { owner = "mondoohq"; repo = "cnquery"; tag = "v${version}"; - hash = "sha256-d+TWg4T4p0QbLoUco88GIgnHfRpyealSasEzYf1YlXk="; + hash = "sha256-e/tD/yo7tV2JkQER1KW9qO9YIo2TQR3jt8uYup/wEt4="; }; subPackages = [ "apps/cnquery" ]; - vendorHash = "sha256-w8xc1lGJkDMwjyVKdUlGfhn7DXlJJnqbOUfFg1Z9qC8="; + vendorHash = "sha256-M3pRUXAwXgdWLaEMXRd6hkH4Z2hh4z38SzO6BeOzjeo="; ldflags = [ "-w" diff --git a/pkgs/by-name/co/codex/package.nix b/pkgs/by-name/co/codex/package.nix new file mode 100644 index 000000000000..0722fd537422 --- /dev/null +++ b/pkgs/by-name/co/codex/package.nix @@ -0,0 +1,29 @@ +{ + lib, + buildNpmPackage, + fetchFromGitHub, +}: + +buildNpmPackage rec { + pname = "codex"; + version = "0.1.04160940"; # from codex-cli/package.json + + src = fetchFromGitHub { + owner = "openai"; + repo = "codex"; + rev = "e8afebac157f2069fc7ae0e33fb44c85ebf48892"; + hash = "sha256-FW03PSmeyJPDPpWw4XEqKZQqEwjOV2VFVQWXmXBevYU="; + }; + + sourceRoot = "${src.name}/codex-cli"; + + npmDepsHash = "sha256-QdfO/p8oQnwIANeNRD0vD55v5lc9dHeaScpnpLqWdxc="; + + meta = { + description = "Lightweight coding agent that runs in your terminal"; + homepage = "https://github.com/openai/codex"; + license = lib.licenses.asl20; + maintainers = [ lib.maintainers.malo ]; + mainProgram = "codex"; + }; +} diff --git a/pkgs/by-name/co/cosmic-protocols/package.nix b/pkgs/by-name/co/cosmic-protocols/package.nix index fbfe4c5fe5ee..7a01b5746413 100644 --- a/pkgs/by-name/co/cosmic-protocols/package.nix +++ b/pkgs/by-name/co/cosmic-protocols/package.nix @@ -9,13 +9,13 @@ stdenv.mkDerivation { pname = "cosmic-protocols"; - version = "0-unstable-2025-03-21"; + version = "0-unstable-2025-04-14"; src = fetchFromGitHub { owner = "pop-os"; repo = "cosmic-protocols"; - rev = "ee0d46f4b7e1508011a98225f14c4a0528ab2914"; - hash = "sha256-oD9BYWX0uPpdsOYAyFq/pI6zxM0SfEb8lq9QA2yrBZY="; + rev = "67df697105486fa4c9dd6ce00889c8b0526c9bb4"; + hash = "sha256-rogV5BTloAatfinrgl7I6hakybLkPRKhnwlILBGKkQU="; }; makeFlags = [ "PREFIX=${placeholder "out"}" ]; diff --git a/pkgs/by-name/co/cotp/package.nix b/pkgs/by-name/co/cotp/package.nix index 69535aef9427..6b41c6d5496f 100644 --- a/pkgs/by-name/co/cotp/package.nix +++ b/pkgs/by-name/co/cotp/package.nix @@ -8,17 +8,17 @@ rustPlatform.buildRustPackage rec { pname = "cotp"; - version = "1.9.2"; + version = "1.9.4"; src = fetchFromGitHub { owner = "replydev"; repo = "cotp"; rev = "v${version}"; - hash = "sha256-5wVIjh16AYwrzjbPgvjsQhihu/vwdQfzU2kZS6eSTWs="; + hash = "sha256-O9qss8vxsGyBWaCTt3trjnFVol5ib/G7IZIj742A/XI="; }; useFetchCargoVendor = true; - cargoHash = "sha256-6VdlXQymOFZgMksGRQ7f9ZGrzKblYlQAoBFUhi4wuM0="; + cargoHash = "sha256-Y8kGOeDKjdG+5zuA1mDx4h5IbKETjZU+SiFWiUv3xkw="; buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ libxcb ]; diff --git a/pkgs/by-name/cr/creek/build.zig.zon.nix b/pkgs/by-name/cr/creek/build.zig.zon.nix index 551c0489363f..557d54ac178c 100644 --- a/pkgs/by-name/cr/creek/build.zig.zon.nix +++ b/pkgs/by-name/cr/creek/build.zig.zon.nix @@ -1,110 +1,31 @@ -# generated by zon2nix (https://github.com/Cloudef/zig2nix) +# generated by zon2nix (https://github.com/nix-community/zon2nix) + { - lib, linkFarm, - fetchurl, + fetchzip, fetchgit, - runCommandLocal, - zig, - name ? "zig-packages", }: -let - unpackZigArtifact = - { - name, - artifact, - }: - runCommandLocal name { nativeBuildInputs = [ zig ]; } '' - hash="$(zig fetch --global-cache-dir "$TMPDIR" ${artifact})" - mv "$TMPDIR/p/$hash" "$out" - chmod 755 "$out" - ''; - fetchZig = - { - name, - url, - hash, - }: - let - artifact = fetchurl { inherit url hash; }; - in - unpackZigArtifact { inherit name artifact; }; - - fetchGitZig = - { - name, - url, - hash, - }: - let - parts = lib.splitString "#" url; - url_base = builtins.elemAt parts 0; - url_without_query = builtins.elemAt (lib.splitString "?" url_base) 0; - rev_base = builtins.elemAt parts 1; - rev = - if builtins.match "^[a-fA-F0-9]{40}$" rev_base != null then rev_base else "refs/heads/${rev_base}"; - in - fetchgit { - inherit name rev hash; - url = url_without_query; - deepClone = false; - }; - - fetchZigArtifact = - { - name, - url, - hash, - }: - let - parts = lib.splitString "://" url; - proto = builtins.elemAt parts 0; - path = builtins.elemAt parts 1; - fetcher = { - "git+http" = fetchGitZig { - inherit name hash; - url = "http://${path}"; - }; - "git+https" = fetchGitZig { - inherit name hash; - url = "https://${path}"; - }; - http = fetchZig { - inherit name hash; - url = "http://${path}"; - }; - https = fetchZig { - inherit name hash; - url = "https://${path}"; - }; - }; - in - fetcher.${proto}; -in -linkFarm name [ +linkFarm "zig-packages" [ { - name = "12209db20ce873af176138b76632931def33a10539387cba745db72933c43d274d56"; - path = fetchZigArtifact { - name = "zig-pixman"; - url = "https://codeberg.org/ifreund/zig-pixman/archive/v0.2.0.tar.gz"; - hash = "sha256-CYgFIOR9H5q8UUpFglaixOocCMT6FGpcKQQBUVWpDKQ="; + name = "fcft-2.0.0-zcx6C5EaAADIEaQzDg5D4UvFFMjSEwDE38vdE9xObeN9"; + path = fetchzip { + url = "https://git.sr.ht/~novakane/zig-fcft/archive/v2.0.0.tar.gz"; + hash = "sha256-qDEtiZNSkzN8jUSnZP/itqh8rMf+lakJy4xMB0I8sxQ="; }; } { - name = "1220687c8c47a48ba285d26a05600f8700d37fc637e223ced3aa8324f3650bf52242"; - path = fetchZigArtifact { - name = "zig-wayland"; - url = "https://codeberg.org/ifreund/zig-wayland/archive/v0.2.0.tar.gz"; - hash = "sha256-gxzkHLCq2NqX3l4nEly92ARU5dqP1SqnjpGMDgx4TXA="; + name = "pixman-0.3.0-LClMnz2VAAAs7QSCGwLimV5VUYx0JFnX5xWU6HwtMuDX"; + path = fetchzip { + url = "https://codeberg.org/ifreund/zig-pixman/archive/v0.3.0.tar.gz"; + hash = "sha256-8tA4auo5FEI4IPnomV6bkpQHUe302tQtorFQZ1l14NU="; }; } { - name = "1220a4029ee3ee70d3175c69878e2b70dccd000c4324bc74ba800d8a143b7250fb38"; - path = fetchZigArtifact { - name = "zig-fcft"; - url = "https://git.sr.ht/~novakane/zig-fcft/archive/1.1.0.tar.gz"; - hash = "sha256-osL/zsXqa8tC/Qvzf0/wXeNCzw02F2viCo+d8Gh2S7U="; + name = "wayland-0.3.0-lQa1kjPIAQDmhGYpY-zxiRzQJFHQ2VqhJkQLbKKdt5wl"; + path = fetchzip { + url = "https://codeberg.org/ifreund/zig-wayland/archive/v0.3.0.tar.gz"; + hash = "sha256-ydEavD9z20wRwn9ZVX56ZI2T5i1tnm3LupVxfa30o84="; }; } ] diff --git a/pkgs/by-name/cr/creek/package.nix b/pkgs/by-name/cr/creek/package.nix index c9971a1e6bad..e68f872896fa 100644 --- a/pkgs/by-name/cr/creek/package.nix +++ b/pkgs/by-name/cr/creek/package.nix @@ -1,7 +1,7 @@ { callPackage, lib, - zig_0_13, + zig_0_14, stdenv, fetchFromGitHub, fcft, @@ -12,43 +12,46 @@ wayland-protocols, }: let - zig = zig_0_13; + zig = zig_0_14; in stdenv.mkDerivation (finalAttrs: { pname = "creek"; - version = "0.4.2"; + version = "0.4.3"; src = fetchFromGitHub { owner = "nmeum"; repo = "creek"; tag = "v${finalAttrs.version}"; - hash = "sha256-3Q690DEMgPqURTHKzJwH5iVyTLvgYqNpxuwAEV+/Lyw="; + hash = "sha256-5TANQt/VWafm6Lj4dYViiK0IMy/chGr/Gzq0S66HZqI="; }; + depsBuildBuild = [ pkg-config ]; + nativeBuildInputs = [ zig.hook pkg-config - wayland wayland-scanner ]; buildInputs = [ fcft pixman + wayland wayland-protocols ]; - deps = callPackage ./build.zig.zon.nix { - inherit zig; - }; + deps = callPackage ./build.zig.zon.nix { }; zigBuildFlags = [ "--system" "${finalAttrs.deps}" ]; + passthru.updateScript = ./update.sh; + meta = { - homepage = "https://git.8pit.net/creek"; + homepage = "https://github.com/nmeum/creek"; + changelog = "https://github.com/nmeum/creek/releases/v${finalAttrs.version}"; description = "Malleable and minimalist status bar for the River compositor"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ alexandrutocar ]; diff --git a/pkgs/by-name/cr/creek/update.sh b/pkgs/by-name/cr/creek/update.sh new file mode 100755 index 000000000000..a346ab54c950 --- /dev/null +++ b/pkgs/by-name/cr/creek/update.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i bash -p bash common-updater-scripts gnused nixfmt-rfc-style + +latest_tag=$(list-git-tags --url=https://github.com/nmeum/creek | sed 's/^v//' | tail -n 1) + +update-source-version creek "$latest_tag" + +wget "https://raw.githubusercontent.com/nmeum/creek/v${latest_tag}/build.zig.zon" +nix --extra-experimental-features 'nix-command flakes' run github:nix-community/zon2nix# -- build.zig.zon >pkgs/by-name/cr/creek/build.zig.zon.nix + +nixfmt pkgs/by-name/cr/creek/build.zig.zon.nix + +rm -rf build.zig.zon diff --git a/pkgs/by-name/cr/crosvm/package.nix b/pkgs/by-name/cr/crosvm/package.nix index 5453a266f42e..afe24ac2b1a3 100644 --- a/pkgs/by-name/cr/crosvm/package.nix +++ b/pkgs/by-name/cr/crosvm/package.nix @@ -85,6 +85,7 @@ rustPlatform.buildRustPackage { license = licenses.bsd3; platforms = [ "aarch64-linux" + "riscv64-linux" "x86_64-linux" ]; }; diff --git a/pkgs/by-name/cr/cryptomator/package.nix b/pkgs/by-name/cr/cryptomator/package.nix index 800c57d798c6..dec64a4a3229 100644 --- a/pkgs/by-name/cr/cryptomator/package.nix +++ b/pkgs/by-name/cr/cryptomator/package.nix @@ -17,18 +17,18 @@ let in maven.buildMavenPackage rec { pname = "cryptomator"; - version = "1.15.2"; + version = "1.15.3"; src = fetchFromGitHub { owner = "cryptomator"; repo = "cryptomator"; tag = version; - hash = "sha256-uhsX4VIA8NNUjxa0dHyB5bhWMxjd2LJfcKJInxROQRY="; + hash = "sha256-3HGSeTUzfcXuNFxPuhkQBQ8CTEvgrNjpFtqOuluCeRs="; }; mvnJdk = jdk; mvnParameters = "-Dmaven.test.skip=true -Plinux"; - mvnHash = "sha256-KfQdYsPdmQRQqjx/kpDQR9tYjb54goA31w55x6VX6KM="; + mvnHash = "sha256-vC2ULlBm/170ElcQC898N4kmWfuWwb7hFpF1oMIukyQ="; preBuild = '' VERSION=${version} diff --git a/pkgs/by-name/de/devenv/package.nix b/pkgs/by-name/de/devenv/package.nix index 38b949855124..068712cd7a11 100644 --- a/pkgs/by-name/de/devenv/package.nix +++ b/pkgs/by-name/de/devenv/package.nix @@ -26,7 +26,7 @@ let doInstallCheck = false; }); - version = "1.5"; + version = "1.5.1"; in rustPlatform.buildRustPackage { pname = "devenv"; @@ -36,7 +36,7 @@ rustPlatform.buildRustPackage { owner = "cachix"; repo = "devenv"; rev = "v${version}"; - hash = "sha256-bJlcIFcEhobOiaJsxub48fR8nIZDU4QK4FIycmDW2mk="; + hash = "sha256-ybqhaIuv8OU0f14Rr+1ilxE4iTCnguXi/60g4ys6JOI="; }; useFetchCargoVendor = true; diff --git a/pkgs/by-name/do/dotnet-ef/package.nix b/pkgs/by-name/do/dotnet-ef/package.nix index aaca7b41c30c..40a125634e65 100644 --- a/pkgs/by-name/do/dotnet-ef/package.nix +++ b/pkgs/by-name/do/dotnet-ef/package.nix @@ -2,9 +2,9 @@ buildDotnetGlobalTool { pname = "dotnet-ef"; - version = "9.0.3"; + version = "9.0.4"; - nugetHash = "sha256-oRBN6Qh5PuVofmboqCpFJR3hUD+MruRYp4whjd9Yu9g="; + nugetHash = "sha256-eQ821C6bx98LJEcdSiozgAaHD2m2+hKVowRTL+L6vzM="; meta = { description = "The Entity Framework Core tools help with design-time development tasks."; diff --git a/pkgs/by-name/el/element-desktop/element-desktop-pin.nix b/pkgs/by-name/el/element-desktop/element-desktop-pin.nix index 6c2c1af2e9c1..732b2cc0676d 100644 --- a/pkgs/by-name/el/element-desktop/element-desktop-pin.nix +++ b/pkgs/by-name/el/element-desktop/element-desktop-pin.nix @@ -1,7 +1,7 @@ { - "version" = "1.11.96"; + "version" = "1.11.97"; "hashes" = { - "desktopSrcHash" = "sha256-oTU/Pvl4gBp69OrUrXEYXupl0WphsEWt32sB4v6T+gA="; - "desktopYarnHash" = "sha256-zMdSA/CkMDXirWZ2uCPTgZ5iErV7rGyR+xcLh9sPDA8="; + "desktopSrcHash" = "sha256-4ea5C1I/bdGsy4CxsNB1GWL8RQnJpHr/MbIOB5Z+gFA="; + "desktopYarnHash" = "sha256-HI/aRf9pGao8m8z3oA0wdbjDQth3zijJeskV2D+KsgM="; }; } diff --git a/pkgs/by-name/el/element-desktop/package.nix b/pkgs/by-name/el/element-desktop/package.nix index 8efe960d6b4f..c3da8dc800a3 100644 --- a/pkgs/by-name/el/element-desktop/package.nix +++ b/pkgs/by-name/el/element-desktop/package.nix @@ -8,7 +8,7 @@ nodejs, fetchYarnDeps, jq, - electron_34, + electron_35, element-web, sqlcipher, callPackage, @@ -22,7 +22,7 @@ let pinData = import ./element-desktop-pin.nix; inherit (pinData.hashes) desktopSrcHash desktopYarnHash; executableName = "element-desktop"; - electron = electron_34; + electron = electron_35; keytar = callPackage ./keytar { inherit electron; }; diff --git a/pkgs/by-name/el/element-web-unwrapped/element-web-pin.nix b/pkgs/by-name/el/element-web-unwrapped/element-web-pin.nix index e6e132a09f70..efbc4f9e8d79 100644 --- a/pkgs/by-name/el/element-web-unwrapped/element-web-pin.nix +++ b/pkgs/by-name/el/element-web-unwrapped/element-web-pin.nix @@ -1,7 +1,7 @@ { - "version" = "1.11.96"; + "version" = "1.11.97"; "hashes" = { - "webSrcHash" = "sha256-EfSQEyMG9v5Boev98FyfzLA3hZLzxSGxAnZFfbc2aVA="; - "webYarnHash" = "sha256-Dp7WXEjWSDQjpmnJUrloIQau6is8YxTYzJmnQBIk+Ys="; + "webSrcHash" = "sha256-x7VS4l2uwXq2wjZeGwnaENHlhwnVz5Gt3f55kiH2Zhk="; + "webYarnHash" = "sha256-uwuBwAZYjt3WsbUCM8q9PaiV5WxKSpyJyVzM8gJOhPo="; }; } diff --git a/pkgs/by-name/en/envoy-bin/package.nix b/pkgs/by-name/en/envoy-bin/package.nix index 9379db80d7ad..2fe4094532cf 100644 --- a/pkgs/by-name/en/envoy-bin/package.nix +++ b/pkgs/by-name/en/envoy-bin/package.nix @@ -8,7 +8,7 @@ versionCheckHook, }: let - version = "1.33.2"; + version = "1.34.0"; inherit (stdenv.hostPlatform) system; throwSystem = throw "envoy-bin is not available for ${system}."; @@ -21,8 +21,8 @@ let hash = { - aarch64-linux = "sha256-gew2iaghIu/wymgMSBdvTTUbb5iBp5zJ2QeKb7Swtqg="; - x86_64-linux = "sha256-vS/4fF78lf14gNcQkV9XPBqrTZxV2NqIbc2R30P610E="; + aarch64-linux = "sha256-VVEYQ25ZNmWftuhLOOZnxKaosQFeMHsQdkAzIq+zEM0="; + x86_64-linux = "sha256-FavpvY1hYNOnlFQE2NV3O8z9gyKGpD01oU/wute9iRA="; } .${system} or throwSystem; in diff --git a/pkgs/by-name/fa/fastp/package.nix b/pkgs/by-name/fa/fastp/package.nix index 89ae4a59486d..d5eeeb41954a 100644 --- a/pkgs/by-name/fa/fastp/package.nix +++ b/pkgs/by-name/fa/fastp/package.nix @@ -9,13 +9,13 @@ stdenv.mkDerivation rec { pname = "fastp"; - version = "0.24.0"; + version = "0.24.1"; src = fetchFromGitHub { owner = "OpenGene"; repo = "fastp"; rev = "v${version}"; - sha256 = "sha256-Jl2Os/6yLWXTDv6irInYlUHpz6QTw8CEMVGFXblAay0="; + sha256 = "sha256-vTAuuhnJ5O2mUFUxM5RIq8w/Zo3SmAgQIDd99YpDcww="; }; buildInputs = [ diff --git a/pkgs/by-name/fd/fdroidserver/package.nix b/pkgs/by-name/fd/fdroidserver/package.nix index c894d37d1798..43f628f4ee95 100644 --- a/pkgs/by-name/fd/fdroidserver/package.nix +++ b/pkgs/by-name/fd/fdroidserver/package.nix @@ -10,7 +10,7 @@ python3Packages.buildPythonApplication rec { pname = "fdroidserver"; - version = "2.3.5"; + version = "2.4.0"; pyproject = true; @@ -18,7 +18,7 @@ python3Packages.buildPythonApplication rec { owner = "fdroid"; repo = "fdroidserver"; tag = version; - hash = "sha256-ESSjC44tdWpmtB+VhEDnUTQz+ZJVQ4jLBjj+0hMSAQA="; + hash = "sha256-PQZz3dyX6vCS0axHfSINMMX5ETdVs44K9XjR87gtd3s="; }; pythonRelaxDeps = [ diff --git a/pkgs/by-name/fe/ferrishot/package.nix b/pkgs/by-name/fe/ferrishot/package.nix new file mode 100644 index 000000000000..618813ba8b3d --- /dev/null +++ b/pkgs/by-name/fe/ferrishot/package.nix @@ -0,0 +1,72 @@ +{ + lib, + stdenv, + rustPlatform, + fetchFromGitHub, + makeBinaryWrapper, + writableTmpDirAsHomeHook, + libGL, + libX11, + libxkbcommon, + libxcb, + wayland, + nix-update-script, +}: + +rustPlatform.buildRustPackage (finalAttrs: { + pname = "ferrishot"; + version = "0.1.0"; + + src = fetchFromGitHub { + owner = "nik-rev"; + repo = "ferrishot"; + tag = "v${finalAttrs.version}"; + hash = "sha256-1jKwbhn85KcIQrSakWTIfxPso7VZuuvPrUbTCF1NerM="; + }; + + useFetchCargoVendor = true; + cargoHash = "sha256-NPReNHKOS4PQIt2lmY5w19lVHPDjznR9gv5vHDXyqaI="; + + nativeBuildInputs = + [ + makeBinaryWrapper + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + # error: unable to open output file '/homeless-shelter/.cache/clang/ModuleCache/354UBE8EJRBZ3/Cocoa-31YYBL2V1XGQP.pcm': 'No such file or directory' + writableTmpDirAsHomeHook + ]; + + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ + libxcb + ]; + + postInstall = + let + runtimeDeps = + [ + libGL + ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ + libX11 + libxkbcommon + wayland + ]; + in + '' + wrapProgram $out/bin/ferrishot \ + --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath runtimeDeps}" + ''; + + passthru = { + updateScript = nix-update-script { }; + }; + + meta = { + description = "Screenshot app written in Rust"; + homepage = "https://github.com/nik-rev/ferrishot"; + changelog = "https://github.com/nik-rev/ferrishot/blob/v${finalAttrs.version}/CHANGELOG.md"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ GaetanLepage ]; + mainProgram = "ferrishot"; + }; +}) diff --git a/pkgs/by-name/fi/files-cli/package.nix b/pkgs/by-name/fi/files-cli/package.nix index 114f38ce4453..df2b746892fc 100644 --- a/pkgs/by-name/fi/files-cli/package.nix +++ b/pkgs/by-name/fi/files-cli/package.nix @@ -8,16 +8,16 @@ buildGoModule rec { pname = "files-cli"; - version = "2.13.266"; + version = "2.13.278"; src = fetchFromGitHub { repo = "files-cli"; owner = "files-com"; rev = "v${version}"; - hash = "sha256-96DSnobVyG50iS6NyCMpZ74KWEtkCyNdFyGXLwrSZxo="; + hash = "sha256-/488GRkU3pQDEkQhLoKQ4ohv4olSnCaLAca/jvq/lsA="; }; - vendorHash = "sha256-ilof8neXlw2Oa3OVceiRbXBkj5nfw+b6VMjMWhPgJqI="; + vendorHash = "sha256-QulVxCaPvXlFwkxe15Et1+rReolABBssTxZspV8KzMs="; ldflags = [ "-s" diff --git a/pkgs/by-name/fr/frida-tools/package.nix b/pkgs/by-name/fr/frida-tools/package.nix index 9cd64d846448..ab5fe8501a2b 100644 --- a/pkgs/by-name/fr/frida-tools/package.nix +++ b/pkgs/by-name/fr/frida-tools/package.nix @@ -6,11 +6,11 @@ python3Packages.buildPythonApplication rec { pname = "frida-tools"; - version = "13.6.1"; + version = "13.7.1"; src = fetchPypi { inherit pname version; - hash = "sha256-imNW0vorY90lp2OkhYLYwgpyW+Vxd1kdq3Lvd4/iNVA="; + hash = "sha256-c0Gq1ep75WAvTGIj4c7xSy0NjCGK5wrRPYzeYyFHDgU="; }; propagatedBuildInputs = with python3Packages; [ diff --git a/pkgs/by-name/ga/gallery-dl/package.nix b/pkgs/by-name/ga/gallery-dl/package.nix index cded6b78595c..af8206fd4f33 100644 --- a/pkgs/by-name/ga/gallery-dl/package.nix +++ b/pkgs/by-name/ga/gallery-dl/package.nix @@ -8,7 +8,7 @@ let pname = "gallery-dl"; - version = "1.29.3"; + version = "1.29.4"; in python3Packages.buildPythonApplication { inherit pname version; @@ -18,7 +18,7 @@ python3Packages.buildPythonApplication { owner = "mikf"; repo = "gallery-dl"; tag = "v${version}"; - hash = "sha256-LzMiJxMl6IWtUloWxBAMLvkhnTQpHkz/gjWl5gW2sZ0="; + hash = "sha256-dQK1AWmdlfb1cRcYzXWUsXmRgjQRc++zEHZvLUygMwg="; }; build-system = [ python3Packages.setuptools ]; diff --git a/pkgs/by-name/ga/gamescope/package.nix b/pkgs/by-name/ga/gamescope/package.nix index 54b9f6261972..23b59aeb52b8 100644 --- a/pkgs/by-name/ga/gamescope/package.nix +++ b/pkgs/by-name/ga/gamescope/package.nix @@ -48,14 +48,14 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "gamescope"; - version = "3.16.3"; + version = "3.16.4"; src = fetchFromGitHub { owner = "ValveSoftware"; repo = "gamescope"; tag = finalAttrs.version; fetchSubmodules = true; - hash = "sha256-4Pbyv+EAgwjabVJ4oW3jSmi0Rzpe+BxCN8mM5/beEco="; + hash = "sha256-2AxqvZA1eZaJFKMfRljCIcP0M2nMngw0FQiXsfBW7IA="; }; patches = [ diff --git a/pkgs/by-name/gi/git-repo/package.nix b/pkgs/by-name/gi/git-repo/package.nix index 28766f08da6a..41b7a06a50c5 100644 --- a/pkgs/by-name/gi/git-repo/package.nix +++ b/pkgs/by-name/gi/git-repo/package.nix @@ -13,13 +13,13 @@ stdenv.mkDerivation rec { pname = "git-repo"; - version = "2.53"; + version = "2.54"; src = fetchFromGitHub { owner = "android"; repo = "tools_repo"; rev = "v${version}"; - hash = "sha256-mPmOnq9j9vnfTynGbOoChLslpyTpIzH6+B2fv5PTHZY="; + hash = "sha256-rZCpuJ4TpbVbTxq7qHfhokoj7qCj9/YcA9PGgd9ROCg="; }; # Fix 'NameError: name 'ssl' is not defined' diff --git a/pkgs/by-name/gl/glance/package.nix b/pkgs/by-name/gl/glance/package.nix index ac440677aabb..b62400a864e7 100644 --- a/pkgs/by-name/gl/glance/package.nix +++ b/pkgs/by-name/gl/glance/package.nix @@ -8,16 +8,16 @@ buildGoModule (finalAttrs: { pname = "glance"; - version = "0.7.9"; + version = "0.7.12"; src = fetchFromGitHub { owner = "glanceapp"; repo = "glance"; tag = "v${finalAttrs.version}"; - hash = "sha256-CUuYwbcKJ985fKcUEV6UNLgOZCjUCOzxNRV+pt5vbnc="; + hash = "sha256-HytxMin0IM6KAqGu/Cq/WCT79DiH01LpTK3RNgWf7iQ="; }; - vendorHash = "sha256-lURRHlZoxbuW1SXxrxy2BkMndcEllGFmVCB4pXBad8Q="; + vendorHash = "sha256-+7mOCU5GNQV8+s9QPki+7CDi4qtOIpwjC//QracwzHI="; ldflags = [ "-s" diff --git a/pkgs/by-name/gm/gmic-qt/package.nix b/pkgs/by-name/gm/gmic-qt/package.nix index 4a07ba02bcef..629097841c03 100644 --- a/pkgs/by-name/gm/gmic-qt/package.nix +++ b/pkgs/by-name/gm/gmic-qt/package.nix @@ -100,7 +100,14 @@ stdenv.mkDerivation (finalAttrs: { cmakeFlags = [ (lib.cmakeBool "ENABLE_DYNAMIC_LINKING" true) (lib.cmakeBool "ENABLE_SYSTEM_GMIC" true) - (lib.cmakeFeature "GMIC_QT_HOST" (if variant == "standalone" then "none" else variant)) + (lib.cmakeFeature "GMIC_QT_HOST" ( + if variant == "standalone" then + "none" + else if variant == "gimp" && gimp.majorVersion == "3.0" then + "gimp3" + else + variant + )) ]; postFixup = lib.optionalString (variant == "gimp") '' diff --git a/pkgs/by-name/go/gofumpt/package.nix b/pkgs/by-name/go/gofumpt/package.nix index 12435ba1918d..13f35f5982b8 100644 --- a/pkgs/by-name/go/gofumpt/package.nix +++ b/pkgs/by-name/go/gofumpt/package.nix @@ -3,28 +3,27 @@ buildGoModule, fetchFromGitHub, nix-update-script, - testers, - gofumpt, + versionCheckHook, }: -buildGoModule rec { +buildGoModule (finalAttrs: { pname = "gofumpt"; - version = "0.7.0"; + version = "0.8.0"; src = fetchFromGitHub { owner = "mvdan"; - repo = pname; - rev = "v${version}"; - hash = "sha256-mJM0uKztX0OUQvynnxeKL9yft7X/Eh28ERg8SbZC5Ws="; + repo = "gofumpt"; + rev = "v${finalAttrs.version}"; + hash = "sha256-37wYYB0k8mhQq30y1oo77qW3bIqqN/K/NG1RgxK6dyI="; }; - vendorHash = "sha256-kJysyxROvB0eMAHbvNF+VXatEicn4ln2Vqkzp7GDWAQ="; + vendorHash = "sha256-T6/xEXv8+io3XwQ2keacpYYIdTnYhTTUCojf62tTwbA="; env.CGO_ENABLED = "0"; ldflags = [ "-s" - "-X main.version=v${version}" + "-X main.version=v${finalAttrs.version}" ]; checkFlags = [ @@ -32,23 +31,20 @@ buildGoModule rec { "-skip=^TestScript/diagnose$" ]; - passthru = { - updateScript = nix-update-script { }; - tests.version = testers.testVersion { - package = gofumpt; - version = "v${version}"; - }; - }; + doInstallCheck = true; + nativeInstallCheckInputs = [ versionCheckHook ]; - meta = with lib; { + passthru.updateScript = nix-update-script { }; + + meta = { description = "Stricter gofmt"; homepage = "https://github.com/mvdan/gofumpt"; - changelog = "https://github.com/mvdan/gofumpt/releases/tag/v${version}"; - license = licenses.bsd3; - maintainers = with maintainers; [ + changelog = "https://github.com/mvdan/gofumpt/releases/tag/v${finalAttrs.version}"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ rvolosatovs katexochen ]; mainProgram = "gofumpt"; }; -} +}) diff --git a/pkgs/by-name/go/golangci-lint/package.nix b/pkgs/by-name/go/golangci-lint/package.nix index 4d1517f03fc9..039deb97ab33 100644 --- a/pkgs/by-name/go/golangci-lint/package.nix +++ b/pkgs/by-name/go/golangci-lint/package.nix @@ -7,16 +7,16 @@ buildGo124Module rec { pname = "golangci-lint"; - version = "2.0.2"; + version = "2.1.2"; src = fetchFromGitHub { owner = "golangci"; repo = "golangci-lint"; rev = "v${version}"; - hash = "sha256-+IndC9znKgVGiFWW0aCNjhxPwX1kDFnfG2+SKEQ15Rc="; + hash = "sha256-CAO+oo3l3mlZIiC1Srhc0EfZffQOHvVkamPHzSKRSFw="; }; - vendorHash = "sha256-B6mCvJtIfRbAv6fZ8Ge82nT9oEcL3WR4D+AAVs9R3zM="; + vendorHash = "sha256-2GQp/sgYRlDengx8uy3zzqi9hwHh4CQUHoj1zaxNNLE="; subPackages = [ "cmd/golangci-lint" ]; diff --git a/pkgs/by-name/gr/grig/0001-Fix-grig-for-hamlib-4.6.x.patch b/pkgs/by-name/gr/grig/0001-Fix-grig-for-hamlib-4.6.x.patch new file mode 100644 index 000000000000..2ddbeb767705 --- /dev/null +++ b/pkgs/by-name/gr/grig/0001-Fix-grig-for-hamlib-4.6.x.patch @@ -0,0 +1,56 @@ +diff --git a/src/main.c b/src/main.c +index d16a7f7..2c596e9 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -125,7 +125,7 @@ static gint grig_app_delete (GtkWidget *, GdkEvent *, gpointer); + static void grig_app_destroy (GtkWidget *, gpointer); + static void grig_show_help (void); + static void grig_show_version (void); +-static gint grig_list_add (const struct rig_caps *, void *); ++static gint grig_list_add (struct rig_caps *, void *); + static gint grig_list_compare (gconstpointer, gconstpointer); + static void grig_sig_handler (int sig); + +@@ -729,7 +729,7 @@ grig_list_rigs () + * \sa grig_list_rigs, grig_list_compare + */ + static gint +-grig_list_add (const struct rig_caps *caps, void *array) ++grig_list_add (struct rig_caps *caps, void *array) + { + grig_rig_info_t *info; + +diff --git a/src/rig-selector.c b/src/rig-selector.c +index 425d41a..e040c0e 100644 +--- a/src/rig-selector.c ++++ b/src/rig-selector.c +@@ -46,7 +46,7 @@ static void add (GtkWidget *, gpointer); + static void delete (GtkWidget *, gpointer); + static void edit (GtkWidget *, gpointer); + static void cancel (GtkWidget *, gpointer); +-static void connect (GtkWidget *, gpointer); ++static void connectrig (GtkWidget *, gpointer); + static void selection_changed (GtkTreeSelection *sel, gpointer data); + + static void render_civ (GtkTreeViewColumn *col, +@@ -191,7 +191,7 @@ rig_selector_execute () + g_signal_connect (G_OBJECT (cancbut), "clicked", + G_CALLBACK (cancel), window); + g_signal_connect (G_OBJECT (conbut), "clicked", +- G_CALLBACK (connect), window); ++ G_CALLBACK (connectrig), window); + g_signal_connect (G_OBJECT (delbut), "clicked", + G_CALLBACK (delete), NULL); + g_signal_connect (G_OBJECT (newbut), "clicked", +@@ -439,7 +439,7 @@ static void cancel (GtkWidget *button, gpointer window) + * simply destroys the rig selector window and whereby control is returned + * to the main() function. + */ +-static void connect (GtkWidget *button, gpointer window) ++static void connectrig (GtkWidget *button, gpointer window) + { + + +-- +2.47.0 + diff --git a/pkgs/by-name/gr/grig/package.nix b/pkgs/by-name/gr/grig/package.nix index 189eaeaa3639..d6dfabd09375 100644 --- a/pkgs/by-name/gr/grig/package.nix +++ b/pkgs/by-name/gr/grig/package.nix @@ -20,6 +20,11 @@ stdenv.mkDerivation rec { sha256 = "sha256-OgIgHW9NMW/xSSti3naIR8AQWUtNSv5bYdOcObStBlM="; }; + patches = [ + # https://github.com/fillods/grig/issues/22 + ./0001-Fix-grig-for-hamlib-4.6.x.patch + ]; + nativeBuildInputs = [ autoreconfHook pkg-config diff --git a/pkgs/by-name/ha/hawkeye/package.nix b/pkgs/by-name/ha/hawkeye/package.nix index 87c36b489103..2dc04ad5a976 100644 --- a/pkgs/by-name/ha/hawkeye/package.nix +++ b/pkgs/by-name/ha/hawkeye/package.nix @@ -5,14 +5,14 @@ pkg-config, }: -rustPackages.rustPlatform.buildRustPackage rec { +rustPackages.rustPlatform.buildRustPackage (finalAttrs: { pname = "hawkeye"; version = "6.0.3"; src = fetchFromGitHub { owner = "korandoru"; repo = "hawkeye"; - tag = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-reeNsnWvn7sSfyqjGIk8jFnv8HaEBJsqitmNbRa9eTM="; }; @@ -24,10 +24,10 @@ rustPackages.rustPlatform.buildRustPackage rec { ]; meta = { - homepage = "https://github.com/korandoro/hawkeye"; + homepage = "https://github.com/korandoru/hawkeye"; description = "Simple license header checker and formatter, in multiple distribution forms"; license = lib.licenses.asl20; mainProgram = "hawkeye"; maintainers = with lib.maintainers; [ matthiasbeyer ]; }; -} +}) diff --git a/pkgs/tools/graphics/hobbits/default.nix b/pkgs/by-name/ho/hobbits/package.nix similarity index 58% rename from pkgs/tools/graphics/hobbits/default.nix rename to pkgs/by-name/ho/hobbits/package.nix index 6a429f9e7065..40afc2fbbadc 100644 --- a/pkgs/tools/graphics/hobbits/default.nix +++ b/pkgs/by-name/ho/hobbits/package.nix @@ -1,7 +1,6 @@ { lib, stdenv, - mkDerivation, fetchFromGitHub, cmake, pkg-config, @@ -9,25 +8,25 @@ libpcap, libusb1, python3, - wrapQtAppsHook, + qt5, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "hobbits"; - version = "0.54.1"; + version = "0.55.0"; src = fetchFromGitHub { owner = "Mahlet-Inc"; repo = "hobbits"; - rev = "v${version}"; - hash = "sha256-SbSuw5e2ll/wU5UBV0MOlvCXb4rvPtsE4l8XzRbBiLI="; + tag = "v${finalAttrs.version}"; + hash = "sha256-W6QBLj+GkmM88cOVSIc1PLiVXysjv74J7citFW6SRDM="; }; postPatch = '' substituteInPlace src/hobbits-core/settingsdata.cpp \ - --replace "pythonHome = \"/usr\"" "pythonHome = \"${python3}\"" + --replace-warn "pythonHome = \"/usr\"" "pythonHome = \"${python3}\"" substituteInPlace cmake/gitversion.cmake \ - --replace "[Mystery Build]" "${version}" + --replace-warn "[Mystery Build]" "${finalAttrs.version}" ''; buildInputs = [ @@ -40,18 +39,18 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config - wrapQtAppsHook + qt5.wrapQtAppsHook ]; - cmakeFlags = [ "-DUSE_SYSTEM_PFFFT=ON" ]; + cmakeFlags = [ (lib.cmakeBool "USE_SYSTEM_PFFFT" true) ]; env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isAarch64 "-Wno-error=narrowing"; - meta = with lib; { + meta = { description = "Multi-platform GUI for bit-based analysis, processing, and visualization"; homepage = "https://github.com/Mahlet-Inc/hobbits"; - license = licenses.mit; - maintainers = with maintainers; [ sikmir ]; - platforms = platforms.linux; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ sikmir ]; + platforms = lib.platforms.linux; }; -} +}) diff --git a/pkgs/by-name/in/industrializer/package.nix b/pkgs/by-name/in/industrializer/package.nix index 6c51086f6521..ec16b8b80101 100644 --- a/pkgs/by-name/in/industrializer/package.nix +++ b/pkgs/by-name/in/industrializer/package.nix @@ -6,10 +6,12 @@ audiofile, autoconf, automake, + gettext, gnome2, gtk2, libGL, libjack2, + libpulseaudio, libtool, libxml2, pkg-config, @@ -28,6 +30,10 @@ stdenv.mkDerivation (finalAttrs: { pkg-config autoconf automake + gettext # autopoint + libxml2 # AM_PATH_XML2 + alsa-lib # AM_PATH_ALSA + libtool ]; buildInputs = [ @@ -37,10 +43,12 @@ stdenv.mkDerivation (finalAttrs: { gtk2 libGL libjack2 - libtool libxml2 + libpulseaudio ]; + strictDeps = true; + preConfigure = "./autogen.sh"; # jack.c:190:5: error: initialization of 'const gchar * (*)(int)' {aka 'const char * (*)(int)'} from incompatible pointer type 'const char * (*)(int * (*)()) diff --git a/pkgs/by-name/in/interactive-html-bom/package.nix b/pkgs/by-name/in/interactive-html-bom/package.nix index a4eaac2c705d..527f3ad89002 100644 --- a/pkgs/by-name/in/interactive-html-bom/package.nix +++ b/pkgs/by-name/in/interactive-html-bom/package.nix @@ -8,14 +8,14 @@ python3Packages.buildPythonApplication rec { pname = "interactive-html-bom"; - version = "2.9.0"; + version = "2.10.0"; pyproject = true; src = fetchFromGitHub { owner = "openscopeproject"; repo = "InteractiveHtmlBom"; tag = "v${version}"; - hash = "sha256-jUHEI0dWMFPQlXei3+0m1ruHzpG1hcRnxptNOXzXDqQ="; + hash = "sha256-o7GWdAFFK3zK0fc7aTSwOsd/c4uPg3cJfR0SXbl2RW8="; }; build-system = [ python3Packages.hatchling ]; @@ -43,7 +43,7 @@ python3Packages.buildPythonApplication rec { description = "Interactive HTML BOM generation for KiCad, EasyEDA, Eagle, Fusion360 and Allegro PCB designer"; homepage = "https://github.com/openscopeproject/InteractiveHtmlBom/"; license = lib.licenses.mit; - changelog = "https://github.com/openscopeproject/InteractiveHtmlBom/releases/tag/v${version}"; + changelog = "https://github.com/openscopeproject/InteractiveHtmlBom/releases/tag/${src.tag}"; maintainers = with lib.maintainers; [ wuyoli ]; mainProgram = "generate_interactive_bom"; }; diff --git a/pkgs/development/misc/juce/juce-8.0.4-cmake_install.patch b/pkgs/by-name/ju/juce/juce-8.0.4-cmake_install.patch similarity index 100% rename from pkgs/development/misc/juce/juce-8.0.4-cmake_install.patch rename to pkgs/by-name/ju/juce/juce-8.0.4-cmake_install.patch diff --git a/pkgs/development/misc/juce/default.nix b/pkgs/by-name/ju/juce/package.nix similarity index 87% rename from pkgs/development/misc/juce/default.nix rename to pkgs/by-name/ju/juce/package.nix index 1dc141cee531..308103c09bb7 100644 --- a/pkgs/development/misc/juce/default.nix +++ b/pkgs/by-name/ju/juce/package.nix @@ -1,6 +1,7 @@ { lib, stdenv, + overrideSDK, fetchFromGitHub, # Native build inputs @@ -32,15 +33,23 @@ nix-update-script, }: +let + # Rebind this in a separate let-binding so that we can then rebind stdenv without infrec below + stdenv' = stdenv; +in +let + stdenv = if stdenv'.hostPlatform.isDarwin then overrideSDK stdenv' "11.0" else stdenv'; +in + stdenv.mkDerivation (finalAttrs: { pname = "juce"; - version = "8.0.6"; + version = "8.0.7"; src = fetchFromGitHub { owner = "juce-framework"; repo = "juce"; tag = finalAttrs.version; - hash = "sha256-uwZVBrvb5O9LEh00y93UeEu4u4rd+tLRCdQdxsMpXNg="; + hash = "sha256-nl4pUSkUKqpMoehzq0MS5pjHpYDkrFpUsY8BwpQObCM="; }; patches = [ diff --git a/pkgs/by-name/ka/kaf/package.nix b/pkgs/by-name/ka/kaf/package.nix index 697d6ca51305..34a542b8ac3a 100644 --- a/pkgs/by-name/ka/kaf/package.nix +++ b/pkgs/by-name/ka/kaf/package.nix @@ -6,13 +6,13 @@ buildGoModule rec { pname = "kaf"; - version = "0.2.11"; + version = "0.2.13"; src = fetchFromGitHub { owner = "birdayz"; repo = "kaf"; rev = "v${version}"; - hash = "sha256-SKQg3BCwvVwjZUkTjrMlSrfa8tu2VC8+ckMZpBJhnZE="; + hash = "sha256-tjHRIbTJJ8HPp2Jk7R2rl+ZN+ie6xRlssx4clcGc4U4="; }; vendorHash = "sha256-1QcQeeYQFsStK27NVdyCAb1Y40lyifBf0dlSgzocG3Y="; diff --git a/pkgs/applications/misc/keepassxc/darwin.patch b/pkgs/by-name/ke/keepassxc/darwin.patch similarity index 100% rename from pkgs/applications/misc/keepassxc/darwin.patch rename to pkgs/by-name/ke/keepassxc/darwin.patch diff --git a/pkgs/applications/misc/keepassxc/firefox-native-messaging-host.json b/pkgs/by-name/ke/keepassxc/firefox-native-messaging-host.json similarity index 100% rename from pkgs/applications/misc/keepassxc/firefox-native-messaging-host.json rename to pkgs/by-name/ke/keepassxc/firefox-native-messaging-host.json diff --git a/pkgs/applications/misc/keepassxc/default.nix b/pkgs/by-name/ke/keepassxc/package.nix similarity index 56% rename from pkgs/applications/misc/keepassxc/default.nix rename to pkgs/by-name/ke/keepassxc/package.nix index 42d69a6f863c..170cc7bfe8e3 100644 --- a/pkgs/applications/misc/keepassxc/default.nix +++ b/pkgs/by-name/ke/keepassxc/package.nix @@ -3,54 +3,46 @@ stdenv, fetchFromGitHub, cmake, - qttools, + libsForQt5, apple-sdk_15, asciidoctor, botan3, curl, darwinMinVersionHook, - kio, libXi, libXtst, libargon2, libusb1, minizip, + nix-update-script, pcsclite, pkg-config, qrencode, - qtbase, - qtmacextras, - qtsvg, - qtx11extras, readline, wrapGAppsHook3, - wrapQtAppsHook, zlib, - LocalAuthentication, - withKeePassBrowser ? true, withKeePassBrowserPasskeys ? true, - withKeePassFDOSecrets ? true, + withKeePassFDOSecrets ? stdenv.hostPlatform.isLinux, withKeePassKeeShare ? true, withKeePassNetworking ? true, withKeePassSSHAgent ? true, - withKeePassTouchID ? true, withKeePassX11 ? true, - withKeePassYubiKey ? true, + withKeePassYubiKey ? stdenv.hostPlatform.isLinux, nixosTests, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "keepassxc"; version = "2.7.10"; src = fetchFromGitHub { owner = "keepassxreboot"; repo = "keepassxc"; - rev = version; + tag = finalAttrs.version; hash = "sha256-FBoqCYNM/leN+w4aV0AJMx/G0bjHbI9KVWrnmq3NfaI="; }; @@ -64,40 +56,58 @@ stdenv.mkDerivation rec { patches = [ ./darwin.patch ]; - cmakeFlags = - [ - "-DKEEPASSXC_BUILD_TYPE=Release" - "-DWITH_GUI_TESTS=ON" - "-DWITH_XC_UPDATECHECK=OFF" - ] - ++ (lib.optional (!withKeePassX11) "-DWITH_XC_X11=OFF") - ++ (lib.optional (withKeePassFDOSecrets && stdenv.hostPlatform.isLinux) "-DWITH_XC_FDOSECRETS=ON") - ++ (lib.optional (withKeePassYubiKey && stdenv.hostPlatform.isLinux) "-DWITH_XC_YUBIKEY=ON") - ++ (lib.optional withKeePassBrowser "-DWITH_XC_BROWSER=ON") - ++ (lib.optional withKeePassBrowserPasskeys "-DWITH_XC_BROWSER_PASSKEYS=ON") - ++ (lib.optional withKeePassKeeShare "-DWITH_XC_KEESHARE=ON") - ++ (lib.optional withKeePassNetworking "-DWITH_XC_NETWORKING=ON") - ++ (lib.optional withKeePassSSHAgent "-DWITH_XC_SSHAGENT=ON"); + cmakeFlags = [ + (lib.cmakeFeature "KEEPASSXC_BUILD_TYPE" "Release") + (lib.cmakeBool "WITH_GUI_TESTS" true) + (lib.cmakeBool "WITH_XC_UPDATECHECK" false) + (lib.cmakeBool "WITH_XC_X11" withKeePassX11) + (lib.cmakeBool "WITH_XC_BROWSER" withKeePassBrowser) + (lib.cmakeBool "WITH_XC_BROWSER_PASSKEYS" withKeePassBrowserPasskeys) + (lib.cmakeBool "WITH_XC_KEESHARE" withKeePassKeeShare) + (lib.cmakeBool "WITH_XC_NETWORKING" withKeePassNetworking) + (lib.cmakeBool "WITH_XC_SSHAGENT" withKeePassSSHAgent) + (lib.cmakeBool "WITH_XC_FDOSECRETS" withKeePassFDOSecrets) + (lib.cmakeBool "WITH_XC_YUBIKEY" withKeePassYubiKey) + ]; doCheck = true; - checkPhase = '' - runHook preCheck + checkPhase = + let + disabledTests = lib.concatStringsSep "|" ( + [ + # flaky + "testcli" + "testgui" + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + # QWidget: Cannot create a QWidget without QApplication + "testautotype" - export LC_ALL="en_US.UTF-8" - export QT_QPA_PLATFORM=offscreen - export QT_PLUGIN_PATH="${qtbase.bin}/${qtbase.qtPluginPrefix}" - # testcli, testgui and testkdbx4 are flaky - skip them all - # testautotype on darwin throws "QWidget: Cannot create a QWidget without QApplication" - make test ARGS+="-E 'testcli|testgui${lib.optionalString stdenv.hostPlatform.isDarwin "|testautotype|testkdbx4"}' --output-on-failure" + # FAIL! : TestDatabase::testExternallyModified() Compared values are not the same + # Actual (((spyFileChanged.count()))): 0 + # Expected (1) : 1 + # Loc: [/tmp/nix-build-keepassxc-2.7.10.drv-2/source/tests/TestDatabase.cpp(288)] + "testdatabase" + ] + ); + in + '' + runHook preCheck - runHook postCheck - ''; + export LC_ALL="en_US.UTF-8" + export QT_QPA_PLATFORM=offscreen + export QT_PLUGIN_PATH="${libsForQt5.qtbase.bin}/${libsForQt5.qtbase.qtPluginPrefix}" + + make test ARGS+="-E '${disabledTests}' --output-on-failure" + + runHook postCheck + ''; nativeBuildInputs = [ asciidoctor cmake - wrapQtAppsHook - qttools + libsForQt5.wrapQtAppsHook + libsForQt5.qttools pkg-config ] ++ lib.optional (!stdenv.hostPlatform.isDarwin) wrapGAppsHook3; @@ -127,35 +137,43 @@ stdenv.mkDerivation rec { buildInputs = [ - curl botan3 - kio + curl libXi libXtst libargon2 + libsForQt5.kio + libsForQt5.qtbase + libsForQt5.qtsvg minizip pcsclite qrencode - qtbase - qtsvg readline zlib ] - ++ lib.optional (stdenv.hostPlatform.isDarwin && withKeePassTouchID) LocalAuthentication ++ lib.optionals stdenv.hostPlatform.isDarwin [ - qtmacextras + libsForQt5.qtmacextras apple-sdk_15 # ScreenCaptureKit, required by livekit, is only available on 12.3 and up: # https://developer.apple.com/documentation/screencapturekit (darwinMinVersionHook "12.3") ] - ++ lib.optional stdenv.hostPlatform.isLinux libusb1 - ++ lib.optional withKeePassX11 qtx11extras; + ++ lib.optionals stdenv.hostPlatform.isLinux [ + libusb1 + ] + ++ lib.optionals withKeePassX11 [ + libsForQt5.qtx11extras + ]; - passthru.tests = nixosTests.keepassxc; + passthru = { + tests = { + inherit (nixosTests) keepassxc; + }; + updateScript = nix-update-script { }; + }; - meta = with lib; { + meta = { description = "Offline password manager with many features"; longDescription = '' A community fork of KeePassX, which is itself a port of KeePass Password Safe. @@ -165,12 +183,13 @@ stdenv.mkDerivation rec { using the KeePassXC Browser Extension (https://github.com/keepassxreboot/keepassxc-browser) ''; homepage = "https://keepassxc.org/"; - license = licenses.gpl2Plus; + changelog = "https://github.com/keepassxreboot/keepassxc/blob/${finalAttrs.version}/CHANGELOG.md"; + license = lib.licenses.gpl2Plus; mainProgram = "keepassxc"; - maintainers = with maintainers; [ + maintainers = with lib.maintainers; [ blankparticle sigmasquadron ]; - platforms = platforms.linux ++ platforms.darwin; + platforms = lib.platforms.linux ++ lib.platforms.darwin; }; -} +}) diff --git a/pkgs/by-name/kn/knot-dns/package.nix b/pkgs/by-name/kn/knot-dns/package.nix index f2c58300c055..361bdb298424 100644 --- a/pkgs/by-name/kn/knot-dns/package.nix +++ b/pkgs/by-name/kn/knot-dns/package.nix @@ -101,6 +101,8 @@ stdenv.mkDerivation rec { "-DNDEBUG" ]; + __darwinAllowLocalNetworking = true; + doCheck = true; checkFlags = [ "V=1" ]; # verbose output in case some test fails doInstallCheck = true; diff --git a/pkgs/by-name/kn/knowsmore/package.nix b/pkgs/by-name/kn/knowsmore/package.nix index cba831dbe077..98e2ada7938d 100644 --- a/pkgs/by-name/kn/knowsmore/package.nix +++ b/pkgs/by-name/kn/knowsmore/package.nix @@ -6,14 +6,14 @@ python3.pkgs.buildPythonApplication rec { pname = "knowsmore"; - version = "0.1.43"; + version = "0.1.44"; pyproject = true; src = fetchFromGitHub { owner = "helviojunior"; repo = "knowsmore"; tag = "v${version}"; - hash = "sha256-rLESaedhEHTMYVbITr3vjyE6urhwl/g1/iTMZ4ruE1c="; + hash = "sha256-m9rleUMQdBrgmeLcoFGIWRm4PKiwiEXONnIfFDxOrHs="; }; pythonRelaxDeps = [ @@ -50,7 +50,7 @@ python3.pkgs.buildPythonApplication rec { meta = with lib; { description = "Tool for pentesting Microsoft Active Directory"; homepage = "https://github.com/helviojunior/knowsmore"; - changelog = "https://github.com/helviojunior/knowsmore/releases/tag/v${version}"; + changelog = "https://github.com/helviojunior/knowsmore/releases/tag/${src.tag}"; license = licenses.gpl3Only; maintainers = with maintainers; [ fab ]; mainProgram = "knowsmore"; diff --git a/pkgs/by-name/ku/kubeone/package.nix b/pkgs/by-name/ku/kubeone/package.nix index 8b4f4e9c1b9e..82c9d1841aed 100644 --- a/pkgs/by-name/ku/kubeone/package.nix +++ b/pkgs/by-name/ku/kubeone/package.nix @@ -9,16 +9,16 @@ buildGoModule rec { pname = "kubeone"; - version = "1.9.2"; + version = "1.10.0"; src = fetchFromGitHub { owner = "kubermatic"; repo = "kubeone"; rev = "v${version}"; - hash = "sha256-pMY86Ucp5nuH63YgAh60l3WZYDPvM8LcTaV9QS2BzAA="; + hash = "sha256-lBeIhsPiEHGSvEhMNjSr5bv/jp2xbbd3wIgaaRARiI8="; }; - vendorHash = "sha256-dvsq2idsLmo1Tc8kfg3pJKNIMosrAMXN1fxvayS7glQ="; + vendorHash = "sha256-Ltrs86I5CAjx21BZZrG+UD5/YdLbaFwJqRQLvGwOA9E="; ldflags = [ "-s" diff --git a/pkgs/by-name/li/libretro-shaders-slang/package.nix b/pkgs/by-name/li/libretro-shaders-slang/package.nix index adbc3ca89e7b..7546283c2732 100644 --- a/pkgs/by-name/li/libretro-shaders-slang/package.nix +++ b/pkgs/by-name/li/libretro-shaders-slang/package.nix @@ -7,13 +7,13 @@ stdenvNoCC.mkDerivation { pname = "libretro-shaders-slang"; - version = "0-unstable-2025-03-13"; + version = "0-unstable-2025-04-14"; src = fetchFromGitHub { owner = "libretro"; repo = "slang-shaders"; - rev = "25311dc03332d9ef2dff8d9d06c611d828028fac"; - hash = "sha256-nmDjjQgxpZcddOHlBAE9CKdR95u+6lEYXcmIwH9RHXo="; + rev = "cacb61c9a3022c84057331063e31304933b61bdf"; + hash = "sha256-dpqru8Qu1xZkHNKv6oF/T61/k6X2CWljUSVeJqxMvso="; }; dontConfigure = true; diff --git a/pkgs/by-name/li/libsignal-ffi/package.nix b/pkgs/by-name/li/libsignal-ffi/package.nix index c474a86bfdfe..9d3f621b9215 100644 --- a/pkgs/by-name/li/libsignal-ffi/package.nix +++ b/pkgs/by-name/li/libsignal-ffi/package.nix @@ -54,6 +54,6 @@ rustPlatform.buildRustPackage rec { description = "C ABI library which exposes Signal protocol logic"; homepage = "https://github.com/signalapp/libsignal"; license = licenses.agpl3Plus; - maintainers = with maintainers; [ niklaskorz ]; + maintainers = with maintainers; [ alyaeanyx ]; }; } diff --git a/pkgs/by-name/li/libzapojit/package.nix b/pkgs/by-name/li/libzapojit/package.nix deleted file mode 100644 index ace4b1bbf65f..000000000000 --- a/pkgs/by-name/li/libzapojit/package.nix +++ /dev/null @@ -1,57 +0,0 @@ -{ - lib, - stdenv, - fetchurl, - pkg-config, - glib, - intltool, - json-glib, - librest, - libsoup_2_4, - gnome, - gnome-online-accounts, - gobject-introspection, -}: - -stdenv.mkDerivation rec { - pname = "libzapojit"; - version = "0.0.3"; - - outputs = [ - "out" - "dev" - ]; - - src = fetchurl { - url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "0zn3s7ryjc3k1abj4k55dr2na844l451nrg9s6cvnnhh569zj99x"; - }; - - nativeBuildInputs = [ - pkg-config - intltool - gobject-introspection - ]; - propagatedBuildInputs = [ - glib - json-glib - librest - libsoup_2_4 - gnome-online-accounts - ]; # zapojit-0.0.pc - - passthru = { - updateScript = gnome.updateScript { - packageName = pname; - versionPolicy = "odd-unstable"; - }; - }; - - meta = with lib; { - description = "GObject wrapper for the SkyDrive and Hotmail REST APIs"; - homepage = "https://gitlab.gnome.org/Archive/libzapojit"; - license = licenses.lgpl21Plus; - maintainers = [ ]; - platforms = platforms.linux; - }; -} diff --git a/pkgs/by-name/lo/lokalise2-cli/package.nix b/pkgs/by-name/lo/lokalise2-cli/package.nix index 32cfb4202228..20bb285a13ad 100644 --- a/pkgs/by-name/lo/lokalise2-cli/package.nix +++ b/pkgs/by-name/lo/lokalise2-cli/package.nix @@ -6,13 +6,13 @@ buildGoModule rec { pname = "lokalise2-cli"; - version = "3.1.2"; + version = "3.1.3"; src = fetchFromGitHub { owner = "lokalise"; repo = "lokalise-cli-2-go"; rev = "v${version}"; - sha256 = "sha256-R8vzHuWkNznq/eeXUVHm9SJJmRV2B2WXKQFEHil+HiY="; + sha256 = "sha256-9d5rlVyGPLNzlKzGq/XJleiKvLtkE0AttIiH6NYUwFo="; }; vendorHash = "sha256-thD8NtG9uVI4KwNQiNsVCUdyUcgAmnr+szsUQ2Ika1c="; diff --git a/pkgs/by-name/lu/lutgen/package.nix b/pkgs/by-name/lu/lutgen/package.nix index 4d096143fbfc..011a65ce898f 100644 --- a/pkgs/by-name/lu/lutgen/package.nix +++ b/pkgs/by-name/lu/lutgen/package.nix @@ -8,17 +8,17 @@ rustPlatform.buildRustPackage rec { pname = "lutgen"; - version = "0.11.2"; + version = "0.12.0"; src = fetchFromGitHub { owner = "ozwaldorf"; repo = "lutgen-rs"; rev = "v${version}"; - hash = "sha256-jmMVeDDVb/TuxulDYj+8y4Kl42EJTAWb3tAsanfWduE="; + hash = "sha256-VE4R0rdQbZ7cyCPRtWWARUAnlR/KWGFUoJSJ4lySwzY="; }; useFetchCargoVendor = true; - cargoHash = "sha256-BEh8Wl0X1wv53w/Zu0PHwh8oGtCvIJe60aVqLbiH1Hs="; + cargoHash = "sha256-H913/EjCh14AcCIj/Em6neP5F6i88rSVbPMmnS3po/I="; nativeBuildInputs = [ installShellFiles ]; diff --git a/pkgs/by-name/ma/maa-assistant-arknights/pin.json b/pkgs/by-name/ma/maa-assistant-arknights/pin.json index 37f6fddacbd8..ea4a9001efe2 100644 --- a/pkgs/by-name/ma/maa-assistant-arknights/pin.json +++ b/pkgs/by-name/ma/maa-assistant-arknights/pin.json @@ -1,10 +1,10 @@ { "stable": { - "version": "5.14.1", - "hash": "sha256-kKupLW0T6XUpmmjlQ4rTBn/bchzkOzvM5qg6PmLSAPk=" + "version": "5.15.1", + "hash": "sha256-nN5bOoLtj5zL5dXZkA/P3sDxZwu/LKfXnMnCxtKJbC0=" }, "beta": { - "version": "5.14.1", - "hash": "sha256-kKupLW0T6XUpmmjlQ4rTBn/bchzkOzvM5qg6PmLSAPk=" + "version": "5.15.1", + "hash": "sha256-nN5bOoLtj5zL5dXZkA/P3sDxZwu/LKfXnMnCxtKJbC0=" } } diff --git a/pkgs/by-name/ma/mago/package.nix b/pkgs/by-name/ma/mago/package.nix index 21d545518bfb..ef663c369c3d 100644 --- a/pkgs/by-name/ma/mago/package.nix +++ b/pkgs/by-name/ma/mago/package.nix @@ -10,17 +10,17 @@ rustPlatform.buildRustPackage rec { pname = "mago"; - version = "0.22.2"; + version = "0.23.0"; src = fetchFromGitHub { owner = "carthage-software"; repo = "mago"; tag = version; - hash = "sha256-78lnNbUKjQYS2BSRGiGmFfnu85Mz+xAwaDG5pVCBqkQ="; + hash = "sha256-Kdktcq3czn6YdGKoTB7AjCtfDkNTHhee/kVhMzxsuD8="; }; useFetchCargoVendor = true; - cargoHash = "sha256-lwL+5HuT6xiiittGlRDaFWfS9qum4xHginHT/TUMcco="; + cargoHash = "sha256-V7x0n+JcXiSGg8sJBKnsB5/KnfJSadYH0i/dNouhoHc="; env = { # Get openssl-sys to use pkg-config diff --git a/pkgs/by-name/ma/markdown-code-runner/package.nix b/pkgs/by-name/ma/markdown-code-runner/package.nix new file mode 100644 index 000000000000..8bae1623ec9b --- /dev/null +++ b/pkgs/by-name/ma/markdown-code-runner/package.nix @@ -0,0 +1,46 @@ +{ + lib, + fetchFromGitHub, + rustPlatform, +}: + +rustPlatform.buildRustPackage { + pname = "markdown-code-runner"; + version = "0-unstable-2025-04-13"; + + src = fetchFromGitHub { + owner = "drupol"; + repo = "markdown-code-runner"; + rev = "b39cdf8990e1a25adc958f58e87a12544724ca9d"; + hash = "sha256-JvsxS+qRrYzWzPlrCAccaPYPROGULCh1Gs5RAlL7dBo="; + }; + + cargoHash = "sha256-JVbBigWKramdtQR9VPRY777vODOw7Fkz+kyNPSnSCJg="; + dontUseCargoParallelTests = true; + + checkFlags = [ + # Flaky tests + "--skip=test_check_mode_detects_differences" + "--skip=test_check_mode_no_changes_returns_zero" + "--skip=test_dry_run_allows_command_failure" + "--skip=test_dry_run_does_not_fail_on_error" + "--skip=test_dry_run_outputs_warning_but_does_not_write" + ]; + + meta = { + description = "A configurable Markdown code runner that executes and optionally replaces code blocks using external commands"; + longDescription = '' + markdown-code-runner is a command-line tool that scans Markdown files for fenced code blocks, + executes them using per-language configuration, and optionally replaces the block content + with the command output. + + It is useful for documentation that stays in sync with linters, formatters, or scripts. + The tool supports placeholder substitution, configurable replace/check modes, and CI-friendly validation. + ''; + homepage = "https://github.com/drupol/markdown-code-runner"; + license = lib.licenses.eupl12; + mainProgram = "mdcr"; + maintainers = with lib.maintainers; [ drupol ]; + platforms = lib.platforms.all; + }; +} diff --git a/pkgs/by-name/ma/mautrix-signal/package.nix b/pkgs/by-name/ma/mautrix-signal/package.nix index 5f32a8660522..70e87a2a7961 100644 --- a/pkgs/by-name/ma/mautrix-signal/package.nix +++ b/pkgs/by-name/ma/mautrix-signal/package.nix @@ -67,7 +67,7 @@ buildGoModule rec { description = "Matrix-Signal puppeting bridge"; license = licenses.agpl3Plus; maintainers = with maintainers; [ - niklaskorz + alyaeanyx ma27 ]; mainProgram = "mautrix-signal"; diff --git a/pkgs/by-name/mi/microsoft-edge/package.nix b/pkgs/by-name/mi/microsoft-edge/package.nix index 3026e499b6d7..90f56e00408d 100644 --- a/pkgs/by-name/mi/microsoft-edge/package.nix +++ b/pkgs/by-name/mi/microsoft-edge/package.nix @@ -174,11 +174,11 @@ in stdenv.mkDerivation (finalAttrs: { pname = "microsoft-edge"; - version = "134.0.3124.95"; + version = "135.0.3179.54"; src = fetchurl { url = "https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-stable/microsoft-edge-stable_${finalAttrs.version}-1_amd64.deb"; - hash = "sha256-vgTJl9BmMdm4Aw1FCpIfqzfmgsLuY61G/RSkA66kPhI="; + hash = "sha256-AppUIXOFouGRxMM6ioZq0cglKkNh811n+36z5yvVAuc="; }; # With strictDeps on, some shebangs were not being patched correctly diff --git a/pkgs/by-name/mi/minify/package.nix b/pkgs/by-name/mi/minify/package.nix index 1742f171ecba..2ade8acd9428 100644 --- a/pkgs/by-name/mi/minify/package.nix +++ b/pkgs/by-name/mi/minify/package.nix @@ -10,16 +10,16 @@ buildGoModule rec { pname = "minify"; - version = "2.22.4"; + version = "2.23.1"; src = fetchFromGitHub { owner = "tdewolff"; repo = pname; rev = "v${version}"; - hash = "sha256-sN3gGxUOWNFBB+iz6i+a0SP8my+IdbMXAVd/bWzzKms="; + hash = "sha256-v0KLQlf2WhI18uanVtvWfX6/7s9ZtfPM5AGyEIHZf54="; }; - vendorHash = "sha256-PxmtYVMkZcJvaM9CYSy5OSUkpyhL1VLwkXoY7uIe7Q8="; + vendorHash = "sha256-Btc5d/wwDmjhyDZwAIHDSbXuh8xqq/nIjTAkPsdeHU4="; nativeBuildInputs = [ installShellFiles ]; diff --git a/pkgs/by-name/mi/misconfig-mapper/package.nix b/pkgs/by-name/mi/misconfig-mapper/package.nix index 1bc25833f15a..fbd13a1002d8 100644 --- a/pkgs/by-name/mi/misconfig-mapper/package.nix +++ b/pkgs/by-name/mi/misconfig-mapper/package.nix @@ -6,16 +6,16 @@ buildGoModule rec { pname = "misconfig-mapper"; - version = "1.13.7"; + version = "1.14.2"; src = fetchFromGitHub { owner = "intigriti"; repo = "misconfig-mapper"; tag = "v${version}"; - hash = "sha256-6WFtXIqnn2ayfXkGMIxGDlYpE3UbHRuAU8qHGk9SCU4="; + hash = "sha256-7ObDlO/jHUMJdEIFwsFrdSyrbs6I6koNJxQyH6FbhZc="; }; - vendorHash = "sha256-fEmf+d9oBXz7KymNVmC+CM7OyPD9QV1uN4ReTNhei7A="; + vendorHash = "sha256-gxURT2S1m7J3bZ0VIYxFFsbxU3za2BgJ/6TONoPGzAw="; ldflags = [ "-s" diff --git a/pkgs/by-name/ms/mscp/package.nix b/pkgs/by-name/ms/mscp/package.nix index f95b0a249d5f..978ea0c53a53 100644 --- a/pkgs/by-name/ms/mscp/package.nix +++ b/pkgs/by-name/ms/mscp/package.nix @@ -9,13 +9,13 @@ }: stdenv.mkDerivation (finalAttrs: { pname = "mscp"; - version = "0.2.1"; + version = "0.2.2"; src = fetchFromGitHub { owner = "upa"; repo = "mscp"; rev = "v${finalAttrs.version}"; - hash = "sha256-TWwvPLqGLhh/IE+hIz/jwaGLBoASs78Iqai1TxN7Wps="; + hash = "sha256-5lX0b3JfjmQh/HlESRMNxqCe2qFRAEZoazysoy252dY="; fetchSubmodules = true; }; diff --git a/pkgs/by-name/mu/muffon/package.nix b/pkgs/by-name/mu/muffon/package.nix index 5546b291ec43..70030c4925e8 100644 --- a/pkgs/by-name/mu/muffon/package.nix +++ b/pkgs/by-name/mu/muffon/package.nix @@ -7,10 +7,10 @@ let pname = "muffon"; - version = "2.1.0"; + version = "2.2.0"; src = fetchurl { url = "https://github.com/staniel359/muffon/releases/download/v${version}/muffon-${version}-linux-x86_64.AppImage"; - hash = "sha256-GT91MLjBWsbk9P5fsIxlYUNziAPsdvMSPq9bLL3rKDw="; + hash = "sha256-VzT/jlNmUYFmUUqi8EzE4ilawezqhSgXHz32+S3FMTo="; }; appimageContents = appimageTools.extractType2 { inherit pname src version; }; in diff --git a/pkgs/by-name/ni/nixos-anywhere/package.nix b/pkgs/by-name/ni/nixos-anywhere/package.nix index 4a80fd1b9c9c..2077e794025b 100644 --- a/pkgs/by-name/ni/nixos-anywhere/package.nix +++ b/pkgs/by-name/ni/nixos-anywhere/package.nix @@ -31,12 +31,12 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "nixos-anywhere"; - version = "1.8.0"; + version = "1.9.0"; src = fetchFromGitHub { owner = "nix-community"; repo = "nixos-anywhere"; rev = finalAttrs.version; - hash = "sha256-7kHxBQuzb7gcHzVmLGljJ4kF6BDDSYVCIxYFDmYPnAo="; + hash = "sha256-DGJ52K2cN3MRUlI/knH0tipGja0Agfk+QVfIQL1gWT4="; }; nativeBuildInputs = [ makeWrapper ]; installPhase = '' diff --git a/pkgs/by-name/nk/nkeys/package.nix b/pkgs/by-name/nk/nkeys/package.nix index 1272455703ea..9fa508349456 100644 --- a/pkgs/by-name/nk/nkeys/package.nix +++ b/pkgs/by-name/nk/nkeys/package.nix @@ -6,16 +6,16 @@ buildGoModule rec { pname = "nkeys"; - version = "0.4.10"; + version = "0.4.11"; src = fetchFromGitHub { owner = "nats-io"; repo = pname; tag = "v${version}"; - hash = "sha256-vSjIqeGWS9sDGyrPD11u4ngiZrW6gZfYd08kKXUDXdU="; + hash = "sha256-dSkIT+KW+hT/Rk3NSkrb5ABLLiGGz2dppr9rwhjLOnM="; }; - vendorHash = "sha256-TtplWIDLUsFXhT5OQVhW3KTfxh1MVY8Hssejy8GBYVQ="; + vendorHash = "sha256-89DGLTkt9c8jJhAX3Uo8BBtLcBbnYE0q4mCqq/RGXM4="; meta = with lib; { description = "Public-key signature system for NATS"; diff --git a/pkgs/by-name/no/nomad-pack/package.nix b/pkgs/by-name/no/nomad-pack/package.nix index 0e5e0c6154dc..b2747e93fc6c 100644 --- a/pkgs/by-name/no/nomad-pack/package.nix +++ b/pkgs/by-name/no/nomad-pack/package.nix @@ -6,16 +6,16 @@ buildGoModule rec { pname = "nomad-pack"; - version = "0.2.0"; + version = "0.3.0"; src = fetchFromGitHub { owner = "hashicorp"; repo = "nomad-pack"; rev = "v${version}"; - sha256 = "sha256-dw6sueC1qibJYc6sbZX8HJlEf9R6O8dlE1aobw70UHw="; + sha256 = "sha256-QtpTnChLB9OfzLSJXr19geHzxmOeL5DQ0G4fgcqCdbc="; }; - vendorHash = "sha256-BKYJ9FZXKpFwK3+mrZAXRkfitSY9jeOLLeC0BOsKc/A="; + vendorHash = "sha256-lygNUHerj9bMJk2+PTUeAJIdTPK9nUYXaByZpzh7uLY="; # skip running go tests as they require network access doCheck = false; diff --git a/pkgs/by-name/op/opcua-commander/package.nix b/pkgs/by-name/op/opcua-commander/package.nix index ac137b7fe184..79af40699445 100644 --- a/pkgs/by-name/op/opcua-commander/package.nix +++ b/pkgs/by-name/op/opcua-commander/package.nix @@ -10,16 +10,16 @@ }: buildNpmPackage rec { pname = "opcua-commander"; - version = "0.39.0"; + version = "0.40.0"; src = fetchFromGitHub { owner = "node-opcua"; repo = "opcua-commander"; rev = version; - hash = "sha256-7KYwIdrhlvGR9RHZBfMFOcBa+opwx7Q/crCdvwZD6Y8="; + hash = "sha256-qoBpYN0EiXiuhH+hXjVPK2ET8Psjz52rocohU8ccVIg="; }; - npmDepsHash = "sha256-g4WFLh+UnziQR2NZ4eL84Vrk+Mz99kFQiBkdGmBEMHE="; + npmDepsHash = "sha256-HB4boWgZWoG+ib+cCoQbUmrrV5rECR3dMwj2lCyJjT0="; nativeBuildInputs = [ esbuild typescript diff --git a/pkgs/by-name/op/open-webui/package.nix b/pkgs/by-name/op/open-webui/package.nix index 741a5e5ad29d..2979f34cc6a4 100644 --- a/pkgs/by-name/op/open-webui/package.nix +++ b/pkgs/by-name/op/open-webui/package.nix @@ -30,7 +30,7 @@ let url = "https://github.com/pyodide/pyodide/releases/download/${pyodideVersion}/pyodide-${pyodideVersion}.tar.bz2"; }; - npmDepsHash = "sha256-C7YuXxCrnJ+8L7JNh6TA8xi0G3y1FwFb9DQwhS+igME="; + npmDepsHash = "sha256-MIjQ5Lbtv6kFHUyuc12JTItUPxIHoo65iUlSjBxw9Z8="; # Disabling `pyodide:fetch` as it downloads packages during `buildPhase` # Until this is solved, running python packages from the browser will not work. diff --git a/pkgs/by-name/pa/paperless-ngx/package.nix b/pkgs/by-name/pa/paperless-ngx/package.nix index 8234e8ba8f12..d6011a8caa02 100644 --- a/pkgs/by-name/pa/paperless-ngx/package.nix +++ b/pkgs/by-name/pa/paperless-ngx/package.nix @@ -27,29 +27,20 @@ xorg, }: let - version = "2.15.1"; + version = "2.15.2"; src = fetchFromGitHub { owner = "paperless-ngx"; repo = "paperless-ngx"; tag = "v${version}"; - hash = "sha256-vICkRfVxzQlqhSBCieVNSGeXb6FCOx0qOnInKMy6Lhg="; + hash = "sha256-3IGXjMVMSbpcdwEvJcMbFuQI9GYy1TY9NWAvum14UK4="; }; - # subpath installation is broken with uvicorn >= 0.26 - # https://github.com/NixOS/nixpkgs/issues/298719 - # https://github.com/paperless-ngx/paperless-ngx/issues/5494 python = python3.override { self = python; packageOverrides = final: prev: { django = prev.django_5; - django-extensions = prev.django-extensions.overridePythonAttrs (_: { - # fails with: TypeError: 'class Meta' got invalid attribute(s): index_together - # probably because of django_5 but it is the latest version available and used like that in paperless-ngx - doCheck = false; - }); - # tesseract5 may be overwritten in the paperless module and we need to propagate that to make the closure reduction effective ocrmypdf = prev.ocrmypdf.override { tesseract = tesseract5; }; }; diff --git a/pkgs/by-name/pa/patch2pr/package.nix b/pkgs/by-name/pa/patch2pr/package.nix index 714c3140070a..ec1bbb709264 100644 --- a/pkgs/by-name/pa/patch2pr/package.nix +++ b/pkgs/by-name/pa/patch2pr/package.nix @@ -8,16 +8,16 @@ buildGoModule rec { pname = "patch2pr"; - version = "0.33.0"; + version = "0.34.0"; src = fetchFromGitHub { owner = "bluekeyes"; repo = "patch2pr"; rev = "v${version}"; - hash = "sha256-RQg7Fo8Z0P+z6Fv6YTv/IpEErP6ncxylvBaeargTrIQ="; + hash = "sha256-5Xb/M7M8PAVXMyr7dwpoT0H4BV7o6okPQQw2e273ogQ="; }; - vendorHash = "sha256-VzskPOd1nlrkiwGsS5OoXP0v8LQbqS+NumV2WoahFvY="; + vendorHash = "sha256-B/Xw8rR+cldLKHr5N6ifBRHWAzJLayiejLi/winPjKg="; ldflags = [ "-X main.version=${version}" diff --git a/pkgs/by-name/pa/patchcil/deps.json b/pkgs/by-name/pa/patchcil/deps.json new file mode 100644 index 000000000000..175fd1c3cb4d --- /dev/null +++ b/pkgs/by-name/pa/patchcil/deps.json @@ -0,0 +1,32 @@ +[ + { + "pname": "AsmResolver", + "version": "6.0.0-beta.1", + "hash": "sha256-ZW61z6Qmztdy2NaiqxvNcP5RWBIiIO6CWNnqYq0MwoA=" + }, + { + "pname": "AsmResolver.DotNet", + "version": "6.0.0-beta.1", + "hash": "sha256-VoTiIr2/r2my6sg2AOEeiqz9vZhWtq5mGaW2Hx90Uo4=" + }, + { + "pname": "AsmResolver.PE", + "version": "6.0.0-beta.1", + "hash": "sha256-tTU/flTxRJaC4gkmI/gctqIriGIMntkgTs51TqzcQlg=" + }, + { + "pname": "AsmResolver.PE.File", + "version": "6.0.0-beta.1", + "hash": "sha256-hPuFrpcm2VMiYEirsL4kYmAhOzjwjNXUklIfYJEonLo=" + }, + { + "pname": "DotNet.Glob", + "version": "3.1.3", + "hash": "sha256-5uGSaGY1IqDjq4RCDLPJm0Lg9oyWmyR96OiNeGqSj84=" + }, + { + "pname": "System.CommandLine", + "version": "2.0.0-beta4.22272.1", + "hash": "sha256-zSO+CYnMH8deBHDI9DHhCPj79Ce3GOzHCyH1/TiHxcc=" + } +] diff --git a/pkgs/by-name/pa/patchcil/package.nix b/pkgs/by-name/pa/patchcil/package.nix new file mode 100644 index 000000000000..d0bdfb97c7b2 --- /dev/null +++ b/pkgs/by-name/pa/patchcil/package.nix @@ -0,0 +1,76 @@ +{ + lib, + fetchFromGitHub, + buildDotnetModule, + dotnetCorePackages, + stdenv, + nix-update-script, + aot ? dotnetCorePackages.sdk_9_0.hasILCompiler && !stdenv.hostPlatform.isDarwin, +}: + +buildDotnetModule rec { + pname = "patchcil"; + version = "0.2.2"; + + src = fetchFromGitHub { + owner = "GGG-KILLER"; + repo = "patchcil"; + tag = "v${version}"; + hash = "sha256-jqVXKp5ShWkIMAgmcwu9/QHy+Ey9d1Piv62wsO0Xm44="; + }; + + nativeBuildInputs = lib.optional aot stdenv.cc; + + projectFile = "src/PatchCil.csproj"; + nugetDeps = ./deps.json; + + dotnet-sdk = dotnetCorePackages.sdk_9_0; + dotnet-runtime = if aot then null else dotnetCorePackages.runtime_9_0; + + selfContainedBuild = aot; + dotnetFlags = lib.optionals (!aot) [ + # Disable AOT + "-p:PublishAot=false" + "-p:InvariantGlobalization=false" + "-p:EventSourceSupport=true" + "-p:HttpActivityPropagationSupport=true" + "-p:MetadataUpdaterSupport=true" + "-p:MetricsSupport=true" + "-p:UseNativeHttpHandler=false" + "-p:XmlResolverIsNetworkingEnabledByDefault=true" + "-p:EnableGeneratedComInterfaceComImportInterop=true" + "-p:_ComObjectDescriptorSupport=true" + "-p:_DataSetXmlSerializationSupport=true" + "-p:_DefaultValueAttributeSupport=true" + "-p:_DesignerHostSupport=true" + "-p:_EnableConsumingManagedCodeFromNativeHosting=true" + "-p:_UseManagedNtlm=true" + ]; + + preFixup = lib.optionalString aot '' + # Remove debug symbols as they shouldn't have anything in them. + rm $out/lib/patchcil/patchcil.dbg + ''; + + executables = [ "patchcil" ]; + + passthru = { + updateScript = nix-update-script { }; + }; + + meta = { + description = "A small utility to modify the library paths from PInvoke in .NET assemblies."; + homepage = "https://github.com/GGG-KILLER/patchcil"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ ggg ]; + mainProgram = "patchcil"; + platforms = [ + "x86_64-linux" + "aarch64-linux" + "x86_64-darwin" + "aarch64-darwin" + "x86_64-windows" + "i686-windows" + ]; + }; +} diff --git a/pkgs/by-name/pi/pinta/deps.json b/pkgs/by-name/pi/pinta/deps.json index 7299114be0cb..c3f40bcc9293 100644 --- a/pkgs/by-name/pi/pinta/deps.json +++ b/pkgs/by-name/pi/pinta/deps.json @@ -1,58 +1,553 @@ [ { - "pname": "AtkSharp", - "version": "3.24.24.38", - "hash": "sha256-J9/+MU+zky18Lk3gfTCox6Jtm1SyjQQAK0vCb5Ecu4k=" + "pname": "GirCore.Adw-1", + "version": "0.6.3", + "hash": "sha256-wV4zTybD7yJldzQORBK2iI/77Fv3C9kjZvtj/S6v48k=" }, { - "pname": "CairoSharp", - "version": "3.24.24.38", - "hash": "sha256-DeXSAuSiGc7SzHb3HsUkLDLe5HZVpRn7VQFNhAAvflg=" + "pname": "GirCore.Cairo-1.0", + "version": "0.6.3", + "hash": "sha256-IJLzVmWkuCzdyiIqlzXyl8/ZDC6hmnh/bf4+i2HOpLw=" }, { - "pname": "GdkSharp", - "version": "3.24.24.38", - "hash": "sha256-JpggYCsUlrGZ1CKjCZMawiCjJDWQQc45YdYuA8L7rzA=" + "pname": "GirCore.FreeType2-2.0", + "version": "0.6.3", + "hash": "sha256-CsH4zQkZukyVw653sphDf5eveuvzY3HVphoO6fvjZiA=" }, { - "pname": "GioSharp", - "version": "3.24.24.38", - "hash": "sha256-RLd7hlelMgp9Eqga+0YxZVHN6GtbCe6IcHct2bPKcaw=" + "pname": "GirCore.Gdk-4.0", + "version": "0.6.3", + "hash": "sha256-3R7ikDBuQJ1iaVb8yuewdLggZ1IVecLuhmjaw1Hzm0s=" }, { - "pname": "GLibSharp", - "version": "3.24.24.38", - "hash": "sha256-df/8vV4OeQ2v8k7HPNrKcoEQdfPUWrHmM2S1F3DrEag=" + "pname": "GirCore.GdkPixbuf-2.0", + "version": "0.6.3", + "hash": "sha256-HZr3YmNLumXTGIN2CvxYZS9mHzvOvpMhUVJ1/DJlWN4=" }, { - "pname": "GtkSharp", - "version": "3.24.24.38", - "hash": "sha256-Uvx7/ylLL4HROPWifMZnOYD9fe0qxlc8QsCayN5TyDI=" + "pname": "GirCore.Gio-2.0", + "version": "0.6.3", + "hash": "sha256-pYc13vCSAH9Or7plQYffBzB/9b83oPNRBf5+HDeT/7w=" }, { - "pname": "Microsoft.Bcl.AsyncInterfaces", - "version": "6.0.0", - "hash": "sha256-49+H/iFwp+AfCICvWcqo9us4CzxApPKC37Q5Eqrw+JU=" + "pname": "GirCore.GLib-2.0", + "version": "0.6.3", + "hash": "sha256-Lsl44qroh+ENO7yBFoySrNgxs8FBeT0nH6PKJ5u+LAI=" + }, + { + "pname": "GirCore.GObject-2.0", + "version": "0.6.3", + "hash": "sha256-+gerXQbv8HNcFjA76AvtzAG3d+CRb7pPYDaAL+iUPz4=" + }, + { + "pname": "GirCore.GObject-2.0.Integration", + "version": "0.6.3", + "hash": "sha256-ujkhIzrqeKOcwdwjgzMh3eTcZ2N5PfgvItfyNj7Kc3s=" + }, + { + "pname": "GirCore.Graphene-1.0", + "version": "0.6.3", + "hash": "sha256-+pDFEj94WNbXD7Fso1xuxkkETjej/O/d1JNW8eV6UPA=" + }, + { + "pname": "GirCore.Gsk-4.0", + "version": "0.6.3", + "hash": "sha256-vV66rP1vVloB+DA1xPL2iSrJwEmdUDdl209RcRpNP9Q=" + }, + { + "pname": "GirCore.Gtk-4.0", + "version": "0.6.3", + "hash": "sha256-unQkwxnaoIihD+FWKnJgJNAR4i99qcTcN78SG8WhrZk=" + }, + { + "pname": "GirCore.HarfBuzz-0.0", + "version": "0.6.3", + "hash": "sha256-8I7+SMTeXBNe6Q/rE7R6WiAYRPuLjfSeDjwllP/n9tM=" + }, + { + "pname": "GirCore.Pango-1.0", + "version": "0.6.3", + "hash": "sha256-4qPtnqcd1gjt/bz6vyq7L4iA8TyDYTlqkkDD6H150Hs=" + }, + { + "pname": "GirCore.PangoCairo-1.0", + "version": "0.6.3", + "hash": "sha256-O8SVg5F8OBazisAwxDB66zlup2hB6hvmO7ubdpSJXpI=" + }, + { + "pname": "Microsoft.CodeAnalysis.Analyzers", + "version": "3.3.4", + "hash": "sha256-qDzTfZBSCvAUu9gzq2k+LOvh6/eRvJ9++VCNck/ZpnE=" + }, + { + "pname": "Microsoft.CodeAnalysis.Common", + "version": "4.8.0", + "hash": "sha256-3IEinVTZq6/aajMVA8XTRO3LTIEt0PuhGyITGJLtqz4=" + }, + { + "pname": "Microsoft.CodeAnalysis.CSharp", + "version": "4.8.0", + "hash": "sha256-MmOnXJvd/ezs5UPcqyGLnbZz5m+VedpRfB+kFZeeqkU=" + }, + { + "pname": "Microsoft.NETCore.Platforms", + "version": "1.0.1", + "hash": "sha256-mZotlGZqtrqDSoBrZhsxFe6fuOv5/BIo0w2Z2x0zVAU=" + }, + { + "pname": "Microsoft.NETCore.Platforms", + "version": "1.1.0", + "hash": "sha256-FeM40ktcObQJk4nMYShB61H/E8B7tIKfl9ObJ0IOcCM=" + }, + { + "pname": "Microsoft.NETCore.Platforms", + "version": "1.1.1", + "hash": "sha256-8hLiUKvy/YirCWlFwzdejD2Db3DaXhHxT7GSZx/znJg=" + }, + { + "pname": "Microsoft.NETCore.Targets", + "version": "1.0.1", + "hash": "sha256-lxxw/Gy32xHi0fLgFWNj4YTFBSBkjx5l6ucmbTyf7V4=" + }, + { + "pname": "Microsoft.NETCore.Targets", + "version": "1.1.0", + "hash": "sha256-0AqQ2gMS8iNlYkrD+BxtIg7cXMnr9xZHtKAuN4bjfaQ=" + }, + { + "pname": "Microsoft.Win32.Primitives", + "version": "4.3.0", + "hash": "sha256-mBNDmPXNTW54XLnPAUwBRvkIORFM7/j0D0I2SyQPDEg=" + }, + { + "pname": "Mono.Addins", + "version": "1.4.2-alpha.4", + "hash": "sha256-RZk63v41ByKGmv0wT57MfX77+ao8KcWEWtkWogucHYM=" + }, + { + "pname": "Mono.Addins.CecilReflector", + "version": "1.4.2-alpha.4", + "hash": "sha256-VPVhTWLKJDhOThuu3Z0Yv1DlOFXp+H7olqwY/YpZE2Q=" + }, + { + "pname": "Mono.Addins.Setup", + "version": "1.4.2-alpha.4", + "hash": "sha256-oPpISiP20NQLlBjkG9fyH0qdgDwl6vxaaykTxVgG9rY=" + }, + { + "pname": "Mono.Cecil", + "version": "0.10.1", + "hash": "sha256-JlELZujFtdTky8wt4k5lmLbY+hxLSzbAWJN0AHq41/4=" }, { "pname": "NGettext", "version": "0.6.7", "hash": "sha256-fmIODwPZkNJsnoNJG+EL1J5mpbuxYI4BsrgD1B4N2NI=" }, - { - "pname": "PangoSharp", - "version": "3.24.24.38", - "hash": "sha256-dq1c/G05iCmWmWZxwLV0e8qvQMS0620Bd0MSz4hEqjI=" - }, { "pname": "ParagonClipper", "version": "6.4.2", "hash": "sha256-jCT6rkghEqMuGwiVeiIAspHW+kuiB2jRl9ireBwhVV0=" }, + { + "pname": "runtime.any.System.Collections", + "version": "4.3.0", + "hash": "sha256-4PGZqyWhZ6/HCTF2KddDsbmTTjxs2oW79YfkberDZS8=" + }, + { + "pname": "runtime.any.System.Diagnostics.Tracing", + "version": "4.3.0", + "hash": "sha256-dsmTLGvt8HqRkDWP8iKVXJCS+akAzENGXKPV18W2RgI=" + }, + { + "pname": "runtime.any.System.Globalization", + "version": "4.3.0", + "hash": "sha256-PaiITTFI2FfPylTEk7DwzfKeiA/g/aooSU1pDcdwWLU=" + }, + { + "pname": "runtime.any.System.Globalization.Calendars", + "version": "4.3.0", + "hash": "sha256-AYh39tgXJVFu8aLi9Y/4rK8yWMaza4S4eaxjfcuEEL4=" + }, + { + "pname": "runtime.any.System.IO", + "version": "4.3.0", + "hash": "sha256-vej7ySRhyvM3pYh/ITMdC25ivSd0WLZAaIQbYj/6HVE=" + }, + { + "pname": "runtime.any.System.Reflection", + "version": "4.3.0", + "hash": "sha256-ns6f++lSA+bi1xXgmW1JkWFb2NaMD+w+YNTfMvyAiQk=" + }, + { + "pname": "runtime.any.System.Reflection.Primitives", + "version": "4.3.0", + "hash": "sha256-LkPXtiDQM3BcdYkAm5uSNOiz3uF4J45qpxn5aBiqNXQ=" + }, + { + "pname": "runtime.any.System.Resources.ResourceManager", + "version": "4.3.0", + "hash": "sha256-9EvnmZslLgLLhJ00o5MWaPuJQlbUFcUF8itGQNVkcQ4=" + }, + { + "pname": "runtime.any.System.Runtime", + "version": "4.3.0", + "hash": "sha256-qwhNXBaJ1DtDkuRacgHwnZmOZ1u9q7N8j0cWOLYOELM=" + }, + { + "pname": "runtime.any.System.Runtime.Handles", + "version": "4.3.0", + "hash": "sha256-PQRACwnSUuxgVySO1840KvqCC9F8iI9iTzxNW0RcBS4=" + }, + { + "pname": "runtime.any.System.Runtime.InteropServices", + "version": "4.3.0", + "hash": "sha256-Kaw5PnLYIiqWbsoF3VKJhy7pkpoGsUwn4ZDCKscbbzA=" + }, + { + "pname": "runtime.any.System.Text.Encoding", + "version": "4.3.0", + "hash": "sha256-Q18B9q26MkWZx68exUfQT30+0PGmpFlDgaF0TnaIGCs=" + }, + { + "pname": "runtime.any.System.Text.Encoding.Extensions", + "version": "4.3.0", + "hash": "sha256-6MYj0RmLh4EVqMtO/MRqBi0HOn5iG4x9JimgCCJ+EFM=" + }, + { + "pname": "runtime.any.System.Threading.Tasks", + "version": "4.3.0", + "hash": "sha256-agdOM0NXupfHbKAQzQT8XgbI9B8hVEh+a/2vqeHctg4=" + }, + { + "pname": "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl", + "version": "4.3.0", + "hash": "sha256-LXUPLX3DJxsU1Pd3UwjO1PO9NM2elNEDXeu2Mu/vNps=" + }, + { + "pname": "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl", + "version": "4.3.2", + "hash": "sha256-EbnOqPOrAgI9eNheXLR++VnY4pHzMsEKw1dFPJ/Fl2c=" + }, + { + "pname": "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl", + "version": "4.3.0", + "hash": "sha256-qeSqaUI80+lqw5MK4vMpmO0CZaqrmYktwp6L+vQAb0I=" + }, + { + "pname": "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl", + "version": "4.3.2", + "hash": "sha256-mVg02TNvJc1BuHU03q3fH3M6cMgkKaQPBxraSHl/Btg=" + }, + { + "pname": "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl", + "version": "4.3.0", + "hash": "sha256-SrHqT9wrCBsxILWtaJgGKd6Odmxm8/Mh7Kh0CUkZVzA=" + }, + { + "pname": "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl", + "version": "4.3.2", + "hash": "sha256-g9Uiikrl+M40hYe0JMlGHe/lrR0+nN05YF64wzLmBBA=" + }, + { + "pname": "runtime.native.System", + "version": "4.3.0", + "hash": "sha256-ZBZaodnjvLXATWpXXakFgcy6P+gjhshFXmglrL5xD5Y=" + }, + { + "pname": "runtime.native.System.Net.Http", + "version": "4.3.0", + "hash": "sha256-c556PyheRwpYhweBjSfIwEyZHnAUB8jWioyKEcp/2dg=" + }, + { + "pname": "runtime.native.System.Security.Cryptography", + "version": "4.0.0", + "hash": "sha256-6Q8eYzC32BbGIiTHoQaE6B3cD81vYQcH5SCswYRSp0w=" + }, + { + "pname": "runtime.native.System.Security.Cryptography.Apple", + "version": "4.3.0", + "hash": "sha256-2IhBv0i6pTcOyr8FFIyfPEaaCHUmJZ8DYwLUwJ+5waw=" + }, + { + "pname": "runtime.native.System.Security.Cryptography.OpenSsl", + "version": "4.3.0", + "hash": "sha256-Jy01KhtcCl2wjMpZWH+X3fhHcVn+SyllWFY8zWlz/6I=" + }, + { + "pname": "runtime.native.System.Security.Cryptography.OpenSsl", + "version": "4.3.2", + "hash": "sha256-xqF6LbbtpzNC9n1Ua16PnYgXHU0LvblEROTfK4vIxX8=" + }, + { + "pname": "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl", + "version": "4.3.0", + "hash": "sha256-wyv00gdlqf8ckxEdV7E+Ql9hJIoPcmYEuyeWb5Oz3mM=" + }, + { + "pname": "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl", + "version": "4.3.2", + "hash": "sha256-aJBu6Frcg6webvzVcKNoUP1b462OAqReF2giTSyBzCQ=" + }, + { + "pname": "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl", + "version": "4.3.0", + "hash": "sha256-zi+b4sCFrA9QBiSGDD7xPV27r3iHGlV99gpyVUjRmc4=" + }, + { + "pname": "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl", + "version": "4.3.2", + "hash": "sha256-Mpt7KN2Kq51QYOEVesEjhWcCGTqWckuPf8HlQ110qLY=" + }, + { + "pname": "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple", + "version": "4.3.0", + "hash": "sha256-serkd4A7F6eciPiPJtUyJyxzdAtupEcWIZQ9nptEzIM=" + }, + { + "pname": "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl", + "version": "4.3.0", + "hash": "sha256-gybQU6mPgaWV3rBG2dbH6tT3tBq8mgze3PROdsuWnX0=" + }, + { + "pname": "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl", + "version": "4.3.2", + "hash": "sha256-JvMltmfVC53mCZtKDHE69G3RT6Id28hnskntP9MMP9U=" + }, + { + "pname": "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl", + "version": "4.3.0", + "hash": "sha256-VsP72GVveWnGUvS/vjOQLv1U80H2K8nZ4fDAmI61Hm4=" + }, + { + "pname": "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl", + "version": "4.3.2", + "hash": "sha256-QfFxWTVRNBhN4Dm1XRbCf+soNQpy81PsZed3x6op/bI=" + }, + { + "pname": "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl", + "version": "4.3.0", + "hash": "sha256-4yKGa/IrNCKuQ3zaDzILdNPD32bNdy6xr5gdJigyF5g=" + }, + { + "pname": "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl", + "version": "4.3.2", + "hash": "sha256-EaJHVc9aDZ6F7ltM2JwlIuiJvqM67CKRq682iVSo+pU=" + }, + { + "pname": "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl", + "version": "4.3.0", + "hash": "sha256-HmdJhhRsiVoOOCcUvAwdjpMRiyuSwdcgEv2j9hxi+Zc=" + }, + { + "pname": "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl", + "version": "4.3.2", + "hash": "sha256-PHR0+6rIjJswn89eoiWYY1DuU8u6xRJLrtjykAMuFmA=" + }, + { + "pname": "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl", + "version": "4.3.0", + "hash": "sha256-pVFUKuPPIx0edQKjzRon3zKq8zhzHEzko/lc01V/jdw=" + }, + { + "pname": "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl", + "version": "4.3.2", + "hash": "sha256-LFkh7ua7R4rI5w2KGjcHlGXLecsncCy6kDXLuy4qD/Q=" + }, + { + "pname": "runtime.unix.Microsoft.Win32.Primitives", + "version": "4.3.0", + "hash": "sha256-LZb23lRXzr26tRS5aA0xyB08JxiblPDoA7HBvn6awXg=" + }, + { + "pname": "runtime.unix.System.Diagnostics.Debug", + "version": "4.3.0", + "hash": "sha256-ReoazscfbGH+R6s6jkg5sIEHWNEvjEoHtIsMbpc7+tI=" + }, + { + "pname": "runtime.unix.System.IO.FileSystem", + "version": "4.3.0", + "hash": "sha256-Pf4mRl6YDK2x2KMh0WdyNgv0VUNdSKVDLlHqozecy5I=" + }, + { + "pname": "runtime.unix.System.Net.Primitives", + "version": "4.3.0", + "hash": "sha256-pHJ+I6i16MV6m77uhTC6GPY6jWGReE3SSP3fVB59ti0=" + }, + { + "pname": "runtime.unix.System.Private.Uri", + "version": "4.3.0", + "hash": "sha256-c5tXWhE/fYbJVl9rXs0uHh3pTsg44YD1dJvyOA0WoMs=" + }, + { + "pname": "runtime.unix.System.Runtime.Extensions", + "version": "4.3.0", + "hash": "sha256-l8S9gt6dk3qYG6HYonHtdlYtBKyPb29uQ6NDjmrt3V4=" + }, { "pname": "SharpZipLib", - "version": "1.4.1", - "hash": "sha256-ZsmWYdcr73k6Vd9HK1sKBrit6LLiSr+haH8l9h+UAbY=" + "version": "1.3.3", + "hash": "sha256-HWEQTKh9Ktwg/zIl079dAiH+ob2ShWFAqLgG6XgIMr4=" + }, + { + "pname": "System.Buffers", + "version": "4.3.0", + "hash": "sha256-XqZWb4Kd04960h4U9seivjKseGA/YEIpdplfHYHQ9jk=" + }, + { + "pname": "System.Collections", + "version": "4.0.11", + "hash": "sha256-puoFMkx4Z55C1XPxNw3np8nzNGjH+G24j43yTIsDRL0=" + }, + { + "pname": "System.Collections", + "version": "4.3.0", + "hash": "sha256-afY7VUtD6w/5mYqrce8kQrvDIfS2GXDINDh73IjxJKc=" + }, + { + "pname": "System.Collections.Concurrent", + "version": "4.0.12", + "hash": "sha256-zIEM7AB4SyE9u6G8+o+gCLLwkgi6+3rHQVPdn/dEwB8=" + }, + { + "pname": "System.Collections.Concurrent", + "version": "4.3.0", + "hash": "sha256-KMY5DfJnDeIsa13DpqvyN8NkReZEMAFnlmNglVoFIXI=" + }, + { + "pname": "System.Collections.Immutable", + "version": "6.0.0", + "hash": "sha256-DKEbpFqXCIEfqp9p3ezqadn5b/S1YTk32/EQK+tEScs=" + }, + { + "pname": "System.Collections.Immutable", + "version": "7.0.0", + "hash": "sha256-9an2wbxue2qrtugYES9awshQg+KfJqajhnhs45kQIdk=" + }, + { + "pname": "System.Collections.NonGeneric", + "version": "4.3.0", + "hash": "sha256-8/yZmD4jjvq7m68SPkJZLBQ79jOTOyT5lyzX4SCYAx8=" + }, + { + "pname": "System.Collections.Specialized", + "version": "4.3.0", + "hash": "sha256-QNg0JJNx+zXMQ26MJRPzH7THdtqjrNtGLUgaR1SdvOk=" + }, + { + "pname": "System.CommandLine", + "version": "2.0.0-beta4.22272.1", + "hash": "sha256-zSO+CYnMH8deBHDI9DHhCPj79Ce3GOzHCyH1/TiHxcc=" + }, + { + "pname": "System.Diagnostics.Debug", + "version": "4.0.11", + "hash": "sha256-P+rSQJVoN6M56jQbs76kZ9G3mAWFdtF27P/RijN8sj4=" + }, + { + "pname": "System.Diagnostics.Debug", + "version": "4.3.0", + "hash": "sha256-fkA79SjPbSeiEcrbbUsb70u9B7wqbsdM9s1LnoKj0gM=" + }, + { + "pname": "System.Diagnostics.DiagnosticSource", + "version": "4.3.0", + "hash": "sha256-OFJRb0ygep0Z3yDBLwAgM/Tkfs4JCDtsNhwDH9cd1Xw=" + }, + { + "pname": "System.Diagnostics.Tracing", + "version": "4.1.0", + "hash": "sha256-JA0jJcLbU3zh52ub3zweob2EVHvxOqiC6SCYHrY5WbQ=" + }, + { + "pname": "System.Diagnostics.Tracing", + "version": "4.3.0", + "hash": "sha256-hCETZpHHGVhPYvb4C0fh4zs+8zv4GPoixagkLZjpa9Q=" + }, + { + "pname": "System.Globalization", + "version": "4.0.11", + "hash": "sha256-rbSgc2PIEc2c2rN6LK3qCREAX3DqA2Nq1WcLrZYsDBw=" + }, + { + "pname": "System.Globalization", + "version": "4.3.0", + "hash": "sha256-caL0pRmFSEsaoeZeWN5BTQtGrAtaQPwFi8YOZPZG5rI=" + }, + { + "pname": "System.Globalization.Calendars", + "version": "4.3.0", + "hash": "sha256-uNOD0EOVFgnS2fMKvMiEtI9aOw00+Pfy/H+qucAQlPc=" + }, + { + "pname": "System.Globalization.Extensions", + "version": "4.3.0", + "hash": "sha256-mmJWA27T0GRVuFP9/sj+4TrR4GJWrzNIk2PDrbr7RQk=" + }, + { + "pname": "System.IO", + "version": "4.1.0", + "hash": "sha256-V6oyQFwWb8NvGxAwvzWnhPxy9dKOfj/XBM3tEC5aHrw=" + }, + { + "pname": "System.IO", + "version": "4.3.0", + "hash": "sha256-ruynQHekFP5wPrDiVyhNiRIXeZ/I9NpjK5pU+HPDiRY=" + }, + { + "pname": "System.IO.FileSystem", + "version": "4.0.1", + "hash": "sha256-4VKXFgcGYCTWVXjAlniAVq0dO3o5s8KHylg2wg2/7k0=" + }, + { + "pname": "System.IO.FileSystem", + "version": "4.3.0", + "hash": "sha256-vNIYnvlayuVj0WfRfYKpDrhDptlhp1pN8CYmlVd2TXw=" + }, + { + "pname": "System.IO.FileSystem.Primitives", + "version": "4.0.1", + "hash": "sha256-IpigKMomqb6pmYWkrlf0ZdpILtRluX2cX5sOKVW0Feg=" + }, + { + "pname": "System.IO.FileSystem.Primitives", + "version": "4.3.0", + "hash": "sha256-LMnfg8Vwavs9cMnq9nNH8IWtAtSfk0/Fy4s4Rt9r1kg=" + }, + { + "pname": "System.Linq", + "version": "4.1.0", + "hash": "sha256-ZQpFtYw5N1F1aX0jUK3Tw+XvM5tnlnshkTCNtfVA794=" + }, + { + "pname": "System.Linq", + "version": "4.3.0", + "hash": "sha256-R5uiSL3l6a3XrXSSL6jz+q/PcyVQzEAByiuXZNSqD/A=" + }, + { + "pname": "System.Net.Http", + "version": "4.3.4", + "hash": "sha256-FMoU0K7nlPLxoDju0NL21Wjlga9GpnAoQjsFhFYYt00=" + }, + { + "pname": "System.Net.Primitives", + "version": "4.3.0", + "hash": "sha256-MY7Z6vOtFMbEKaLW9nOSZeAjcWpwCtdO7/W1mkGZBzE=" + }, + { + "pname": "System.Private.Uri", + "version": "4.3.0", + "hash": "sha256-fVfgcoP4AVN1E5wHZbKBIOPYZ/xBeSIdsNF+bdukIRM=" + }, + { + "pname": "System.Reflection", + "version": "4.1.0", + "hash": "sha256-idZHGH2Yl/hha1CM4VzLhsaR8Ljo/rV7TYe7mwRJSMs=" + }, + { + "pname": "System.Reflection", + "version": "4.3.0", + "hash": "sha256-NQSZRpZLvtPWDlvmMIdGxcVuyUnw92ZURo0hXsEshXY=" }, { "pname": "System.Reflection.Emit", @@ -60,13 +555,178 @@ "hash": "sha256-Fw/CSRD+wajH1MqfKS3Q/sIrUH7GN4K+F+Dx68UPNIg=" }, { - "pname": "System.Security.Principal.Windows", - "version": "4.7.0", - "hash": "sha256-rWBM2U8Kq3rEdaa1MPZSYOOkbtMGgWyB8iPrpIqmpqg=" + "pname": "System.Reflection.Metadata", + "version": "7.0.0", + "hash": "sha256-GwAKQhkhPBYTqmRdG9c9taqrKSKDwyUgOEhWLKxWNPI=" + }, + { + "pname": "System.Reflection.Primitives", + "version": "4.0.1", + "hash": "sha256-SFSfpWEyCBMAOerrMCOiKnpT+UAWTvRcmoRquJR6Vq0=" + }, + { + "pname": "System.Reflection.Primitives", + "version": "4.3.0", + "hash": "sha256-5ogwWB4vlQTl3jjk1xjniG2ozbFIjZTL9ug0usZQuBM=" + }, + { + "pname": "System.Resources.ResourceManager", + "version": "4.0.1", + "hash": "sha256-cZ2/3/fczLjEpn6j3xkgQV9ouOVjy4Kisgw5xWw9kSw=" + }, + { + "pname": "System.Resources.ResourceManager", + "version": "4.3.0", + "hash": "sha256-idiOD93xbbrbwwSnD4mORA9RYi/D/U48eRUsn/WnWGo=" + }, + { + "pname": "System.Runtime", + "version": "4.1.0", + "hash": "sha256-FViNGM/4oWtlP6w0JC0vJU+k9efLKZ+yaXrnEeabDQo=" + }, + { + "pname": "System.Runtime", + "version": "4.3.0", + "hash": "sha256-51813WXpBIsuA6fUtE5XaRQjcWdQ2/lmEokJt97u0Rg=" + }, + { + "pname": "System.Runtime.CompilerServices.Unsafe", + "version": "6.0.0", + "hash": "sha256-bEG1PnDp7uKYz/OgLOWs3RWwQSVYm+AnPwVmAmcgp2I=" + }, + { + "pname": "System.Runtime.Extensions", + "version": "4.1.0", + "hash": "sha256-X7DZ5CbPY7jHs20YZ7bmcXs9B5Mxptu/HnBUvUnNhGc=" + }, + { + "pname": "System.Runtime.Extensions", + "version": "4.3.0", + "hash": "sha256-wLDHmozr84v1W2zYCWYxxj0FR0JDYHSVRaRuDm0bd/o=" + }, + { + "pname": "System.Runtime.Handles", + "version": "4.0.1", + "hash": "sha256-j2QgVO9ZOjv7D1het98CoFpjoYgxjupuIhuBUmLLH7w=" + }, + { + "pname": "System.Runtime.Handles", + "version": "4.3.0", + "hash": "sha256-KJ5aXoGpB56Y6+iepBkdpx/AfaJDAitx4vrkLqR7gms=" + }, + { + "pname": "System.Runtime.InteropServices", + "version": "4.1.0", + "hash": "sha256-QceAYlJvkPRJc/+5jR+wQpNNI3aqGySWWSO30e/FfQY=" + }, + { + "pname": "System.Runtime.InteropServices", + "version": "4.3.0", + "hash": "sha256-8sDH+WUJfCR+7e4nfpftj/+lstEiZixWUBueR2zmHgI=" + }, + { + "pname": "System.Runtime.Numerics", + "version": "4.0.1", + "hash": "sha256-1pJt5ZGxLPTX1mjOi8qZPXyyOMkYV0NstoUCv91HYPg=" + }, + { + "pname": "System.Runtime.Numerics", + "version": "4.3.0", + "hash": "sha256-P5jHCgMbgFMYiONvzmaKFeOqcAIDPu/U8bOVrNPYKqc=" + }, + { + "pname": "System.Security.Cryptography.Algorithms", + "version": "4.2.0", + "hash": "sha256-BelNIpEyToEp/VYKnje/q1P7KNEpQNtOzGPU18pLGpE=" + }, + { + "pname": "System.Security.Cryptography.Algorithms", + "version": "4.3.0", + "hash": "sha256-tAJvNSlczYBJ3Ed24Ae27a55tq/n4D3fubNQdwcKWA8=" + }, + { + "pname": "System.Security.Cryptography.Cng", + "version": "4.3.0", + "hash": "sha256-u17vy6wNhqok91SrVLno2M1EzLHZm6VMca85xbVChsw=" + }, + { + "pname": "System.Security.Cryptography.Csp", + "version": "4.0.0", + "hash": "sha256-WHyR6vVK3zaT4De7jgQFUar1P5fiX9ECwiVkJDFFm7M=" + }, + { + "pname": "System.Security.Cryptography.Csp", + "version": "4.3.0", + "hash": "sha256-oefdTU/Z2PWU9nlat8uiRDGq/PGZoSPRgkML11pmvPQ=" + }, + { + "pname": "System.Security.Cryptography.Encoding", + "version": "4.0.0", + "hash": "sha256-ZO7ha39J5uHkIF2RoEKv/bW/bLbVvYMO4+rWyYsKHik=" + }, + { + "pname": "System.Security.Cryptography.Encoding", + "version": "4.3.0", + "hash": "sha256-Yuge89N6M+NcblcvXMeyHZ6kZDfwBv3LPMDiF8HhJss=" + }, + { + "pname": "System.Security.Cryptography.OpenSsl", + "version": "4.3.0", + "hash": "sha256-DL+D2sc2JrQiB4oAcUggTFyD8w3aLEjJfod5JPe+Oz4=" + }, + { + "pname": "System.Security.Cryptography.Primitives", + "version": "4.0.0", + "hash": "sha256-sEdPftfTxQd/8DpdpqUZC2XWC0SjVCPqAkEleLl17EQ=" + }, + { + "pname": "System.Security.Cryptography.Primitives", + "version": "4.3.0", + "hash": "sha256-fnFi7B3SnVj5a+BbgXnbjnGNvWrCEU6Hp/wjsjWz318=" + }, + { + "pname": "System.Security.Cryptography.X509Certificates", + "version": "4.3.0", + "hash": "sha256-MG3V/owDh273GCUPsGGraNwaVpcydupl3EtPXj6TVG0=" + }, + { + "pname": "System.Text.Encoding", + "version": "4.0.11", + "hash": "sha256-PEailOvG05CVgPTyKLtpAgRydlSHmtd5K0Y8GSHY2Lc=" + }, + { + "pname": "System.Text.Encoding", + "version": "4.3.0", + "hash": "sha256-GctHVGLZAa/rqkBNhsBGnsiWdKyv6VDubYpGkuOkBLg=" + }, + { + "pname": "System.Text.Encoding.Extensions", + "version": "4.3.0", + "hash": "sha256-vufHXg8QAKxHlujPHHcrtGwAqFmsCD6HKjfDAiHyAYc=" + }, + { + "pname": "System.Threading", + "version": "4.0.11", + "hash": "sha256-mob1Zv3qLQhQ1/xOLXZmYqpniNUMCfn02n8ZkaAhqac=" + }, + { + "pname": "System.Threading", + "version": "4.3.0", + "hash": "sha256-ZDQ3dR4pzVwmaqBg4hacZaVenQ/3yAF/uV7BXZXjiWc=" + }, + { + "pname": "System.Threading.Tasks", + "version": "4.0.11", + "hash": "sha256-5SLxzFg1df6bTm2t09xeI01wa5qQglqUwwJNlQPJIVs=" + }, + { + "pname": "System.Threading.Tasks", + "version": "4.3.0", + "hash": "sha256-Z5rXfJ1EXp3G32IKZGiZ6koMjRu0n8C1NGrwpdIen4w=" }, { "pname": "Tmds.DBus", - "version": "0.11.0", - "hash": "sha256-xNArjhSaEZcRiRB+mb9ZwUPQUqbLjRYt4JV2WUtM+hg=" + "version": "0.21.2", + "hash": "sha256-1rxUexOuj0raH8FvvUKeGdcWr3u8KmuAySe/4isy6S0=" } ] diff --git a/pkgs/by-name/pi/pinta/package.nix b/pkgs/by-name/pi/pinta/package.nix index e3704ef9ea77..e04cfa245bb5 100644 --- a/pkgs/by-name/pi/pinta/package.nix +++ b/pkgs/by-name/pi/pinta/package.nix @@ -4,26 +4,38 @@ dotnetCorePackages, fetchFromGitHub, glibcLocales, - gtk3, + gtk4, intltool, - wrapGAppsHook3, + libadwaita, + wrapGAppsHook4, }: buildDotnetModule rec { pname = "Pinta"; - version = "2.1.2"; + version = "3.0"; + + src = fetchFromGitHub { + owner = "PintaProject"; + repo = "Pinta"; + rev = version; + hash = "sha256-87uzUIgivBI2W+vJV/LflxJoUPJCW5SlodwcC1pSOUk="; + }; nativeBuildInputs = [ intltool - wrapGAppsHook3 + wrapGAppsHook4 ]; + runtimeDeps = [ + gtk4 + libadwaita + ]; + + buildInputs = runtimeDeps; + dotnet-sdk = dotnetCorePackages.sdk_8_0; dotnet-runtime = dotnetCorePackages.runtime_8_0; - runtimeDeps = [ gtk3 ]; - buildInputs = runtimeDeps; - # How-to update deps: # $ nix-build -A pinta.fetch-deps # $ ./result @@ -32,13 +44,6 @@ buildDotnetModule rec { projectFile = "Pinta"; - src = fetchFromGitHub { - owner = "PintaProject"; - repo = "Pinta"; - rev = version; - hash = "sha256-/GMYF7G469oX5W1zjv5A9a6tcLX+4g6Sf9cDqxSjgWg="; - }; - # https://github.com/NixOS/nixpkgs/issues/38991 # bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) env.LOCALE_ARCHIVE = "${glibcLocales}/lib/locale/locale-archive"; diff --git a/pkgs/by-name/pk/pkgsite/package.nix b/pkgs/by-name/pk/pkgsite/package.nix index 692c399a5855..e50a9be6bd0a 100644 --- a/pkgs/by-name/pk/pkgsite/package.nix +++ b/pkgs/by-name/pk/pkgsite/package.nix @@ -7,16 +7,16 @@ buildGoModule { pname = "pkgsite"; - version = "0-unstable-2025-04-01"; + version = "0-unstable-2025-04-16"; src = fetchFromGitHub { owner = "golang"; repo = "pkgsite"; - rev = "e806f9c8871f0247a0989e5124d82e7d841bce91"; - hash = "sha256-J8v0P+KIhh07c0G+XN5aWuVp2btaJel2T+U6g/D/2sM="; + rev = "0a075a2cae6ac8ff829d0d7c7841d064d6833167"; + hash = "sha256-kYmxR6ZzlHDBeAYFDlUN5EcgRDpB/S00Xx3N1MbKsIk="; }; - vendorHash = "sha256-M4cbpMZ/ujnMUoGp//KpBM2oEl/RCOfI1IcmoGMw+fw="; + vendorHash = "sha256-JoPuNktN4OsdNJ0e8BRuuD0CKuWiFsAcLAS5h9rH/Z0="; subPackages = [ "cmd/pkgsite" ]; diff --git a/pkgs/by-name/po/polarity/package.nix b/pkgs/by-name/po/polarity/package.nix index d424b8f126ac..c61c6579140b 100644 --- a/pkgs/by-name/po/polarity/package.nix +++ b/pkgs/by-name/po/polarity/package.nix @@ -7,17 +7,17 @@ rustPlatform.buildRustPackage rec { pname = "polarity"; - version = "latest-unstable-2025-04-06"; + version = "latest-unstable-2025-04-14"; src = fetchFromGitHub { owner = "polarity-lang"; repo = "polarity"; - rev = "3d661ea0485a83b0c1065595839cb2d9d594e4e8"; - hash = "sha256-4NeDOGzCq211SVVtfISq/Z901Et1zYhMQ/t7eNEBW9Y="; + rev = "9ee17a9a167efdd660c4806e2d3cd5bc2b3177e1"; + hash = "sha256-9MsPMQnqzePhxF9f9DgmZ9aq8TzLYi3jZA9HF2McVss="; }; useFetchCargoVendor = true; - cargoHash = "sha256-S0d64jFKiyGVIFH8HhT4mzBEVUPDIMevvClTeqy0/28="; + cargoHash = "sha256-23qr4bEAsN75ONnNmym9eWH38fRoMmP1EkmOaka73Ko="; passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; }; diff --git a/pkgs/by-name/po/portunus/package.nix b/pkgs/by-name/po/portunus/package.nix index 96408db6f66d..e09bf265b52f 100644 --- a/pkgs/by-name/po/portunus/package.nix +++ b/pkgs/by-name/po/portunus/package.nix @@ -8,13 +8,13 @@ buildGoModule rec { pname = "portunus"; - version = "2.1.1"; + version = "2.1.2"; src = fetchFromGitHub { owner = "majewsky"; repo = "portunus"; rev = "v${version}"; - sha256 = "sha256-+pMMIutj+OWKZmOYH5NuA4a7aS5CD+33vAEC9bJmyfM="; + sha256 = "sha256-nLFwfH1K6vsgNATwAxyq/q6HTtfLK8gsQhei7eJ86Kc="; }; buildInputs = [ libxcrypt ]; diff --git a/pkgs/by-name/po/powerpipe/package.nix b/pkgs/by-name/po/powerpipe/package.nix index 1834b3973282..8bb44837f8e8 100644 --- a/pkgs/by-name/po/powerpipe/package.nix +++ b/pkgs/by-name/po/powerpipe/package.nix @@ -11,13 +11,13 @@ buildGoModule rec { pname = "powerpipe"; - version = "1.2.4"; + version = "1.2.5"; src = fetchFromGitHub { owner = "turbot"; repo = "powerpipe"; tag = "v${version}"; - hash = "sha256-nYlhB6EeT98FF/FuYsJXgGfe7+naKwhTmOPy1lX90XQ="; + hash = "sha256-S4NxKxro0K7uplB47CFO0Pm2qz7VvgqHbKxh/6Nd9P4="; }; vendorHash = "sha256-5+IapEYAL4p5jhGhqNw00s42e3dE0cXRDVawq8Fqb08="; diff --git a/pkgs/by-name/pq/pq-cli/package.nix b/pkgs/by-name/pq/pq-cli/package.nix index e28c93026d70..225ee762b0d7 100644 --- a/pkgs/by-name/pq/pq-cli/package.nix +++ b/pkgs/by-name/pq/pq-cli/package.nix @@ -7,14 +7,14 @@ python3Packages.buildPythonApplication rec { pname = "pq-cli"; - version = "1.0.2-unstable-2025-04-04"; + version = "1.0.2-unstable-2025-04-10"; pyproject = true; src = fetchFromGitHub { owner = "rr-"; repo = "pq-cli"; - rev = "e6d18352c5874364a7bbb65ad41a198838d907ed"; - hash = "sha256-gT9vxz4oAtoatG8dUDJbr60yyKhglFrxNe1SQMKilb8="; + rev = "7790e52a6d3c0f6fbaf45f581f0fb98f78247af6"; + hash = "sha256-lRvjSOhEAur8dhrtpGb89BMD3o6/E1aJjyp+G4xZDnQ="; }; build-system = with python3Packages; [ diff --git a/pkgs/by-name/pr/prowler/package.nix b/pkgs/by-name/pr/prowler/package.nix index 836deed2015e..9677e9f0ce03 100644 --- a/pkgs/by-name/pr/prowler/package.nix +++ b/pkgs/by-name/pr/prowler/package.nix @@ -21,14 +21,14 @@ let in py.pkgs.buildPythonApplication rec { pname = "prowler"; - version = "5.5.0"; + version = "5.5.1"; pyproject = true; src = fetchFromGitHub { owner = "prowler-cloud"; repo = "prowler"; tag = version; - hash = "sha256-HHSMGqLroFGY39znzRw8kJpQOyAvHzgeIBcGj5sM24A="; + hash = "sha256-SljpmFZNfenLB+meJHjnGsnDCRBi+60/IMlJLWtBw7Q="; }; pythonRelaxDeps = true; diff --git a/pkgs/by-name/py/pyfa/package.nix b/pkgs/by-name/py/pyfa/package.nix index 5851bcd5475e..578ef30da73e 100644 --- a/pkgs/by-name/py/pyfa/package.nix +++ b/pkgs/by-name/py/pyfa/package.nix @@ -10,7 +10,7 @@ copyDesktopItems, }: let - version = "2.62.2"; + version = "2.62.3"; in python3Packages.buildPythonApplication rec { inherit version; @@ -21,7 +21,7 @@ python3Packages.buildPythonApplication rec { owner = "pyfa-org"; repo = "Pyfa"; tag = "v${version}"; - hash = "sha256-7YFObKV4vXiTWgCfek7k4yVq7IG3JMtaB36Jhu7rGjk="; + hash = "sha256-PqiwZwok7Mv1M4txU3D5MZYu8WxDCetLmvTqZ30rypY="; }; desktopItems = [ diff --git a/pkgs/by-name/qu/quisk/package.nix b/pkgs/by-name/qu/quisk/package.nix index e9d10a52cfd8..69312e3b20a4 100644 --- a/pkgs/by-name/qu/quisk/package.nix +++ b/pkgs/by-name/qu/quisk/package.nix @@ -9,11 +9,11 @@ python3.pkgs.buildPythonApplication rec { pname = "quisk"; - version = "4.2.41"; + version = "4.2.42"; src = fetchPypi { inherit pname version; - hash = "sha256-du6VcKn5WvLnlUrW9tKWT7MlMIZ2bpkrsO4yHC8cM6Q="; + hash = "sha256-Di5B0irH6G8XQtwXVDk4FXwLRo5Nh+cyt9zsG7+dMkc="; }; buildInputs = [ diff --git a/pkgs/by-name/ra/raycast/package.nix b/pkgs/by-name/ra/raycast/package.nix index 5790f8b8e5cd..d81453d25a56 100644 --- a/pkgs/by-name/ra/raycast/package.nix +++ b/pkgs/by-name/ra/raycast/package.nix @@ -12,19 +12,19 @@ stdenvNoCC.mkDerivation (finalAttrs: { pname = "raycast"; - version = "1.95.0"; + version = "1.96.0"; src = { aarch64-darwin = fetchurl { name = "Raycast.dmg"; url = "https://releases.raycast.com/releases/${finalAttrs.version}/download?build=arm"; - hash = "sha256-Fh0V/iZqryuqKs8D1V9isHJBh+WFHicrTMckKCh4pQE="; + hash = "sha256-GN9luYvWzUsLp6KzKV+Iwc2shxRHkOLSDq6ZJaKZ7vU="; }; x86_64-darwin = fetchurl { name = "Raycast.dmg"; url = "https://releases.raycast.com/releases/${finalAttrs.version}/download?build=x86_64"; - hash = "sha256-AD4iCBbNMU0Px/NieXvmG/Q3deJ6P/dcVgwFo0vNoOo="; + hash = "sha256-HGO6mZvnBk9R1IS8dNDGj3dwgSNJ+XPjAG4+gJ0KvY4="; }; } .${stdenvNoCC.system} or (throw "raycast: ${stdenvNoCC.system} is unsupported."); diff --git a/pkgs/by-name/re/release-plz/package.nix b/pkgs/by-name/re/release-plz/package.nix index 31b81e647d12..b74644fd4b74 100644 --- a/pkgs/by-name/re/release-plz/package.nix +++ b/pkgs/by-name/re/release-plz/package.nix @@ -11,17 +11,17 @@ rustPlatform.buildRustPackage rec { pname = "release-plz"; - version = "0.3.130"; + version = "0.3.132"; src = fetchFromGitHub { owner = "MarcoIeni"; repo = "release-plz"; rev = "release-plz-v${version}"; - hash = "sha256-ulxKOlUn2FjdKOxBLHzRwaANijO4K2sgGZAUOPIqAl0="; + hash = "sha256-J2ViqVJEBGBiKfG9S7/p5RNjFNNp0A6b3Htv5c0On6M="; }; useFetchCargoVendor = true; - cargoHash = "sha256-pQErY/kUn9N+rVJZdHMCF74EKr9HOcHgqeBpKdmoHfQ="; + cargoHash = "sha256-z67GXNJ9QSRIafTCeVjr0T+EYdcT/Blr7pBGQJgobdc="; nativeBuildInputs = [ installShellFiles diff --git a/pkgs/by-name/rk/rkbin/package.nix b/pkgs/by-name/rk/rkbin/package.nix index f13113238467..b4481753bee0 100644 --- a/pkgs/by-name/rk/rkbin/package.nix +++ b/pkgs/by-name/rk/rkbin/package.nix @@ -25,6 +25,7 @@ stdenv.mkDerivation { passthru = { BL31_RK3568 = "${rkbin}/bin/rk35/rk3568_bl31_v1.44.elf"; BL31_RK3588 = "${rkbin}/bin/rk35/rk3588_bl31_v1.47.elf"; + TPL_RK3566 = "${rkbin}/bin/rk35/rk3566_ddr_1056MHz_v1.23.bin"; TPL_RK3568 = "${rkbin}/bin/rk35/rk3568_ddr_1056MHz_v1.23.bin"; TPL_RK3588 = "${rkbin}/bin/rk35/rk3588_ddr_lp4_2112MHz_lp5_2400MHz_v1.18.bin"; }; diff --git a/pkgs/by-name/sa/sane-airscan/package.nix b/pkgs/by-name/sa/sane-airscan/package.nix index 69738bf67f6b..fa89d36bd10e 100644 --- a/pkgs/by-name/sa/sane-airscan/package.nix +++ b/pkgs/by-name/sa/sane-airscan/package.nix @@ -15,7 +15,7 @@ }: stdenv.mkDerivation rec { pname = "sane-airscan"; - version = "0.99.33"; + version = "0.99.34"; nativeBuildInputs = [ meson @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { owner = "alexpevzner"; repo = pname; rev = version; - sha256 = "sha256-qZ7j76cwJQxGXbgIkV2bYt7puG0lSEw/d6d3fw19TCk="; + sha256 = "sha256-4srMsZhco9YOukmguLQ5HvNeIz7wShmhWt7m5kP4iW8="; }; meta = with lib; { diff --git a/pkgs/by-name/sc/scaleway-cli/package.nix b/pkgs/by-name/sc/scaleway-cli/package.nix index 1cf763df8793..e85690293277 100644 --- a/pkgs/by-name/sc/scaleway-cli/package.nix +++ b/pkgs/by-name/sc/scaleway-cli/package.nix @@ -6,16 +6,16 @@ buildGoModule rec { pname = "scaleway-cli"; - version = "2.38.0"; + version = "2.39.0"; src = fetchFromGitHub { owner = "scaleway"; repo = "scaleway-cli"; rev = "v${version}"; - sha256 = "sha256-3yte4gNl8uBSHfDp11HH+l3trN+d5YcEYajpruyOrKc="; + sha256 = "sha256-i4fEOcoizlCZbyUln8DYVbYcAXgnimCFHV0FdgeOjHE="; }; - vendorHash = "sha256-BYWuAzsfqNtswiNHWzNWusgh0SyxlEBEHdOrGjpd1/8="; + vendorHash = "sha256-dy8alr6DM0sNEWrqW+vATmVKbupbKOuMsAodwgPLHk4="; ldflags = [ "-w" diff --git a/pkgs/by-name/sc/screen-pipe/package.nix b/pkgs/by-name/sc/screen-pipe/package.nix index 141eca8d82c7..36118fc16fdd 100644 --- a/pkgs/by-name/sc/screen-pipe/package.nix +++ b/pkgs/by-name/sc/screen-pipe/package.nix @@ -9,9 +9,9 @@ openssl, sqlite, stdenv, - darwin, alsa-lib, xorg, + apple-sdk_12, }: rustPlatform.buildRustPackage rec { pname = "screen-pipe"; @@ -49,22 +49,9 @@ rustPlatform.buildRustPackage rec { openssl sqlite ] - ++ lib.optionals stdenv.hostPlatform.isDarwin ( - with darwin.apple_sdk_12_3.frameworks; - [ - CoreAudio - AudioUnit - CoreFoundation - CoreGraphics - CoreMedia - IOKit - Metal - MetalPerformanceShaders - Security - ScreenCaptureKit - SystemConfiguration - ] - ) + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + apple-sdk_12 + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib xorg.libxcb diff --git a/pkgs/by-name/si/signalbackup-tools/package.nix b/pkgs/by-name/si/signalbackup-tools/package.nix index bfbf1a63929f..c20ce4ae3c87 100644 --- a/pkgs/by-name/si/signalbackup-tools/package.nix +++ b/pkgs/by-name/si/signalbackup-tools/package.nix @@ -13,13 +13,13 @@ stdenv.mkDerivation rec { pname = "signalbackup-tools"; - version = "20250410-2"; + version = "20250413"; src = fetchFromGitHub { owner = "bepaald"; repo = "signalbackup-tools"; rev = version; - hash = "sha256-VnxqaZH9jTRnVgGOcUd8SaT+SndFGOWzNGZyFVa7Tlk="; + hash = "sha256-AToQwv0SHbk4KQj1iNsr9YWWAYAlO9hVbImqPEXPgYU="; }; nativeBuildInputs = diff --git a/pkgs/by-name/sl/slskd/deps.json b/pkgs/by-name/sl/slskd/deps.json index 2229e5050cb4..afffb6a8d3dd 100644 --- a/pkgs/by-name/sl/slskd/deps.json +++ b/pkgs/by-name/sl/slskd/deps.json @@ -781,8 +781,8 @@ }, { "pname": "Soulseek", - "version": "7.0.1", - "hash": "sha256-sGs+AomE20UILH0+RcArkMAR/Xk7yewppMnvg2YZ1WQ=" + "version": "7.0.3", + "hash": "sha256-/GCUh4XJ4zs5etxQ0GjNJozkS2GZ/Qq1cot1+bRQack=" }, { "pname": "SQLitePCLRaw.bundle_e_sqlite3", diff --git a/pkgs/by-name/sl/slskd/package.nix b/pkgs/by-name/sl/slskd/package.nix index d022abfbc63c..c42b98dad505 100644 --- a/pkgs/by-name/sl/slskd/package.nix +++ b/pkgs/by-name/sl/slskd/package.nix @@ -19,13 +19,13 @@ let in buildDotnetModule rec { pname = "slskd"; - version = "0.22.3"; + version = "0.22.5"; src = fetchFromGitHub { owner = "slskd"; repo = "slskd"; tag = version; - hash = "sha256-CXJ55mtNVaPZVxuzYyiMjnJJZPAUlRc/DHKt6+ZfWHo="; + hash = "sha256-gLPWbRffoCJAdg8zP9idfnzqT1nIZrI88cYUd/DyxZA="; }; nativeBuildInputs = [ @@ -40,7 +40,7 @@ buildDotnetModule rec { name = "${pname}-${version}-npm-deps"; inherit src; sourceRoot = "${src.name}/${npmRoot}"; - hash = "sha256-I/rgSIFFCA47Y22zbmrrdUWS7mHCxKmFwO3QNBHTdCM="; + hash = "sha256-GACe+ufxiSlS1aD9R+I8VqbZqi2gCHUp+Dm/XMx2WZQ="; }; projectFile = "slskd.sln"; diff --git a/pkgs/by-name/sm/smartsynchronize/package.nix b/pkgs/by-name/sm/smartsynchronize/package.nix new file mode 100644 index 000000000000..5dffdf8e96b8 --- /dev/null +++ b/pkgs/by-name/sm/smartsynchronize/package.nix @@ -0,0 +1,104 @@ +{ + lib, + stdenv, + fetchurl, + makeDesktopItem, + openjdk21, + gtk3, + glib, + adwaita-icon-theme, + wrapGAppsHook3, + libXtst, + which, +}: +let + jre = openjdk21; +in +stdenv.mkDerivation (finalAttrs: { + pname = "smartsynchronize"; + version = "4.6.1"; + + src = fetchurl { + url = "https://www.syntevo.com/downloads/smartsynchronize/smartsynchronize-linux-${ + builtins.replaceStrings [ "." ] [ "_" ] finalAttrs.version + }.tar.gz"; + hash = "sha256-oc1GFwiA6LPbCsCsGGENEz9ktcu0NINfQ9dsL27VIpI="; + }; + + nativeBuildInputs = [ wrapGAppsHook3 ]; + + buildInputs = [ + jre + adwaita-icon-theme + gtk3 + ]; + + preFixup = '' + gappsWrapperArgs+=( \ + --prefix PATH : ${ + lib.makeBinPath [ + jre + which + ] + } \ + --prefix LD_LIBRARY_PATH : ${ + lib.makeLibraryPath [ + gtk3 + glib + libXtst + ] + } \ + --prefix JAVA_HOME : ${jre} \ + ) + ''; + + installPhase = '' + runHook preInstall + + mkdir -pv $out/{bin,share/applications,share/icons/hicolor/scalable/apps/} + cp -av ./lib $out/ + cp -av bin/smartsynchronize.sh $out/bin/smartsynchronize + + cp -av $desktopItem/share/applications/* $out/share/applications/ + for icon_size in 32 48 64 128 256; do + path=$icon_size'x'$icon_size + icon=bin/smartsynchronize-$icon_size.png + mkdir -p $out/share/icons/hicolor/$path/apps + cp $icon $out/share/icons/hicolor/$path/apps/smartsynchronize.png + done + + cp -av bin/smartsynchronize.svg $out/share/icons/hicolor/scalable/apps/ + + runHook postInstall + ''; + + desktopItem = makeDesktopItem { + name = "smartsynchronize"; + exec = "smartsynchronize"; + comment = finalAttrs.meta.description; + icon = "smartsynchronize"; + desktopName = "SmartSynchronize"; + categories = [ "Development" ]; + startupNotify = true; + startupWMClass = "smartsynchronize"; + keywords = [ + "compare" + "file manager" + ]; + }; + + meta = { + description = "File Manager, File/Directory Compare"; + longDescription = '' + SmartSynchronize is a dual-pane, keyboard-centric, multi-platform file manager. + It also is known for its file compare, directory compare and file merge. + SmartSynchronize is free to use for active Open Source developers and users from academic institutions. + ''; + homepage = "https://www.syntevo.com/smartsynchronize/"; + changelog = "https://www.syntevo.com/smartsynchronize/changelog-${lib.versions.majorMinor finalAttrs.version}.txt"; + license = lib.licenses.unfree; + mainProgram = "smartsynchronize"; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ tmssngr ]; + }; +}) diff --git a/pkgs/by-name/sn/snakemake/package.nix b/pkgs/by-name/sn/snakemake/package.nix index b3d49ae7bc86..7444d183d82d 100644 --- a/pkgs/by-name/sn/snakemake/package.nix +++ b/pkgs/by-name/sn/snakemake/package.nix @@ -10,14 +10,14 @@ python3Packages.buildPythonApplication rec { pname = "snakemake"; - version = "8.29.2"; + version = "9.1.10"; pyproject = true; src = fetchFromGitHub { owner = "snakemake"; repo = "snakemake"; tag = "v${version}"; - hash = "sha256-69NsbfHF29l92gwO8If9vp8Cdjac3BnO+hbY3b2bZ8E="; + hash = "sha256-saEfclp6cRcBBUv/ssszr9Q8PGPapkSsjDwTUP9XOhg="; }; postPatch = '' @@ -25,13 +25,13 @@ python3Packages.buildPythonApplication rec { substituteInPlace tests/common.py \ --replace-fail 'os.environ["PYTHONPATH"] = os.getcwd()' "pass" \ --replace-fail 'del os.environ["PYTHONPATH"]' "pass" - substituteInPlace snakemake/unit_tests/__init__.py \ + substituteInPlace src/snakemake/unit_tests/__init__.py \ --replace-fail '"unit_tests/templates"' '"'"$PWD"'/snakemake/unit_tests/templates"' - substituteInPlace snakemake/assets/__init__.py \ + substituteInPlace src/snakemake/assets/__init__.py \ --replace-fail "raise err" "return bytes('err','ascii')" ''; - build-system = with python3Packages; [ setuptools ]; + build-system = with python3Packages; [ setuptools-scm ]; dependencies = with python3Packages; [ appdirs @@ -55,6 +55,7 @@ python3Packages.buildPythonApplication rec { smart-open snakemake-interface-executor-plugins snakemake-interface-common + snakemake-interface-logger-plugins snakemake-interface-storage-plugins snakemake-interface-report-plugins stopit @@ -126,6 +127,20 @@ python3Packages.buildPythonApplication rec { "test_deploy_sources" "test_output_file_cache_storage" "test_storage" + + # Tries to access internet + "test_report_after_run" + + # Needs stress-ng + "test_benchmark" + "test_benchmark_jsonl" + + # Needs unshare + "test_nodelocal" + + # Requires snakemake-storage-plugin-http + "test_keep_local" + "test_retrieve" ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Unclear failure: @@ -144,6 +159,14 @@ python3Packages.buildPythonApplication rec { "test_queue_input_forceall" "test_resources_submitted_to_cluster" "test_scopes_submitted_to_cluster" + + # Issue with /dev/stderr in sandbox + "test_protected_symlink_output" + + # Unclear issue: + # pulp.apis.core.PulpSolverError: Pulp: cannot execute cbc cwd: + # but pulp solver is not default + "test_access_patterns" ]; pythonImportsCheck = [ "snakemake" ]; diff --git a/pkgs/by-name/sn/snx-rs/package.nix b/pkgs/by-name/sn/snx-rs/package.nix index 69328f7b3d05..be931652bd21 100644 --- a/pkgs/by-name/sn/snx-rs/package.nix +++ b/pkgs/by-name/sn/snx-rs/package.nix @@ -18,13 +18,13 @@ }: rustPlatform.buildRustPackage rec { pname = "snx-rs"; - version = "3.1.1"; + version = "3.1.2"; src = fetchFromGitHub { owner = "ancwrd1"; repo = "snx-rs"; tag = "v${version}"; - hash = "sha256-eWtoCU5JkpHGcOLzjzj9icDlnIW1y+fiEn5V/E5IQ4U="; + hash = "sha256-bLuIXd2pqqiyEP+lDTJYVDZkRZ0HcDkKFZd/qlpuf98="; }; passthru.updateScript = nix-update-script { }; @@ -57,7 +57,7 @@ rustPlatform.buildRustPackage rec { ]; useFetchCargoVendor = true; - cargoHash = "sha256-Hjc2wKkNmlVjZb5wz9fq9hzUsxXJyeFYq+4C+weUlq0="; + cargoHash = "sha256-E5OJVf9CkLn5mFtk4Yacs2OIvAuIw0idSs7QuTNvfgU="; meta = { description = "Open source Linux client for Checkpoint VPN tunnels"; diff --git a/pkgs/by-name/so/sooperlooper/package.nix b/pkgs/by-name/so/sooperlooper/package.nix index 2dd184be7ecf..c849da803959 100644 --- a/pkgs/by-name/so/sooperlooper/package.nix +++ b/pkgs/by-name/so/sooperlooper/package.nix @@ -2,7 +2,6 @@ lib, stdenv, fetchFromGitHub, - fetchpatch, autoreconfHook, pkg-config, which, @@ -21,25 +20,17 @@ fftw, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "sooperlooper"; - version = "1.7.8"; + version = "1.7.9"; src = fetchFromGitHub { owner = "essej"; repo = "sooperlooper"; - rev = "v${version}"; - sha256 = "sha256-Lrsz/UDCgoac63FJ3CaPVaYwvBtzkGQQRLhUi6lUusE="; + rev = "v${finalAttrs.version}"; + sha256 = "sha256-bPu/VWTJLSIMoJSEQb+/nqtTpkPtCNVuXA17XsnFSP0="; }; - patches = [ - (fetchpatch { - name = "10-build_with_wx_32.patch"; - url = "https://sources.debian.org/data/main/s/sooperlooper/1.7.8~dfsg0-2/debian/patches/10-build_with_wx_32.patch"; - sha256 = "sha256-NF/w+zgRBNkSTqUJhfH9kQogXSYEF70pCN+loR0hjpg="; - }) - ]; - autoreconfPhase = '' patchShebangs ./autogen.sh ./autogen.sh @@ -67,9 +58,12 @@ stdenv.mkDerivation rec { fftw ]; + # see https://bugs.gentoo.org/925275 + CPPFLAGS = "-fpermissive"; + enableParallelBuilding = true; - meta = with lib; { + meta = { description = "Live looping sampler capable of immediate loop recording, overdubbing, multiplying, reversing and more"; longDescription = '' It allows for multiple simultaneous multi-channel loops limited only by your computer's available memory. @@ -79,8 +73,9 @@ stdenv.mkDerivation rec { and the engine can be run standalone on a computer without a monitor. ''; homepage = "https://sonosaurus.com/sooperlooper/"; - license = licenses.gpl2; - maintainers = with maintainers; [ magnetophon ]; - platforms = platforms.linux; + downloadPage = "https://github.com/essej/sooperlooper"; + license = lib.licenses.gpl2; + maintainers = with lib.maintainers; [ magnetophon ]; + platforms = lib.platforms.linux; }; -} +}) diff --git a/pkgs/by-name/sp/spacetimedb/package.nix b/pkgs/by-name/sp/spacetimedb/package.nix index c96a27fac831..b6bccdac05f6 100644 --- a/pkgs/by-name/sp/spacetimedb/package.nix +++ b/pkgs/by-name/sp/spacetimedb/package.nix @@ -9,17 +9,17 @@ }: rustPlatform.buildRustPackage (finalAttrs: { pname = "spacetimedb"; - version = "1.0.1"; + version = "1.1.0"; src = fetchFromGitHub { owner = "clockworklabs"; repo = "spacetimedb"; tag = "v${finalAttrs.version}"; - hash = "sha256-yqBKZOUDdvBcW8OzO832P75miNKUluR+fR1FSOcDoSM="; + hash = "sha256-WBPH/vwko7Znh6yJi3DOwZ9SnfCpOcX1so/svBCjFQ8="; }; useFetchCargoVendor = true; - cargoHash = "sha256-W3SbJE0tt391k6MscgaijCStSyzfTN2MR66a6K+Ui4s="; + cargoHash = "sha256-YObtesidnH0GMGD9ENS4YSrcBB4A4TAQmqV4NodSwfY="; nativeBuildInputs = [ pkg-config diff --git a/pkgs/by-name/st/stylance-cli/package.nix b/pkgs/by-name/st/stylance-cli/package.nix index c1b378d60a69..5e44efe1b338 100644 --- a/pkgs/by-name/st/stylance-cli/package.nix +++ b/pkgs/by-name/st/stylance-cli/package.nix @@ -5,15 +5,15 @@ }: rustPlatform.buildRustPackage rec { pname = "stylance-cli"; - version = "0.5.5"; + version = "0.6.0"; src = fetchCrate { inherit pname version; - hash = "sha256-/aTda9TOwC2spODMWQIaBzJJ17/8EoWIRZ7DjJE/ta4="; + hash = "sha256-uksDnxTBuzwpMDCO3HIg05IK1emba6BjbpN0TcWSOdQ="; }; useFetchCargoVendor = true; - cargoHash = "sha256-ZMIbNQMZ7uCYFSIX2NTGY/31V6e0QWHjZvVaA8Vv7IQ="; + cargoHash = "sha256-iSE6SmqYXg9IAMJOb4/q80w+J2OEVd7oyxRpWcCps9U="; meta = with lib; { description = "Library and cli tool for working with scoped CSS in rust"; diff --git a/pkgs/by-name/su/supersonic/package.nix b/pkgs/by-name/su/supersonic/package.nix index 934a2fe2374e..4af8cecaf004 100644 --- a/pkgs/by-name/su/supersonic/package.nix +++ b/pkgs/by-name/su/supersonic/package.nix @@ -21,13 +21,13 @@ assert waylandSupport -> stdenv.hostPlatform.isLinux; buildGoModule rec { pname = "supersonic" + lib.optionalString waylandSupport "-wayland"; - version = "0.15.0"; + version = "0.15.1"; src = fetchFromGitHub { owner = "dweymouth"; repo = "supersonic"; rev = "v${version}"; - hash = "sha256-U6J1L2KDAEhIrSpbS5wMSc1Q9y5YMahhFNe6ArbwV2s="; + hash = "sha256-TuZtOZJM7bz14kOGvptSWJ2t3sgUD9GGoZlSaCRs4M0="; }; vendorHash = "sha256-fc86z8bvdFI3LdlyHej2G42O554hpRszqre+e3WUOKI="; diff --git a/pkgs/by-name/sw/swagger-cli/package.nix b/pkgs/by-name/sw/swagger-cli/package.nix index f78dd09b46a4..5b72e1e8d5d4 100644 --- a/pkgs/by-name/sw/swagger-cli/package.nix +++ b/pkgs/by-name/sw/swagger-cli/package.nix @@ -21,6 +21,10 @@ buildNpmPackage rec { npm run bump ''; + postInstall = '' + find $out/lib/node_modules -xtype l -delete + ''; + meta = with lib; { description = "Swagger 2.0 and OpenAPI 3.0 command-line tool"; homepage = "https://apitools.dev/swagger-cli/"; diff --git a/pkgs/by-name/sy/synapse-admin-etkecc/package.nix b/pkgs/by-name/sy/synapse-admin-etkecc/package.nix new file mode 100644 index 000000000000..8f445e0000f0 --- /dev/null +++ b/pkgs/by-name/sy/synapse-admin-etkecc/package.nix @@ -0,0 +1,79 @@ +{ + lib, + stdenv, + fetchFromGitHub, + fetchYarnDeps, + yarnConfigHook, + yarnBuildHook, + nodejs, + nix-update-script, + writers, + baseUrl ? null, +}: + +assert lib.asserts.assertMsg ( + baseUrl == null +) "The baseUrl parameter is deprecated, please use .withConfig instead"; + +stdenv.mkDerivation (finalAttrs: { + pname = "synapse-admin-etkecc"; + version = "0.10.3-etke39"; + + src = fetchFromGitHub { + owner = "etkecc"; + repo = "synapse-admin"; + tag = "v${finalAttrs.version}"; + hash = "sha256-1jE4QrHAnH27FrfpgM8rKd4I2AAJArtL0jgcWVc8TrU="; + }; + + yarnOfflineCache = fetchYarnDeps { + yarnLock = finalAttrs.src + "/yarn.lock"; + hash = "sha256-60rS/OfPEQmmZ5j7mUjMPyK9prgNOX7MkYpu9djdjxQ="; + }; + + nativeBuildInputs = [ + nodejs + yarnConfigHook + yarnBuildHook + ]; + + env = { + NODE_ENV = "production"; + SYNAPSE_ADMIN_VERSION = finalAttrs.version; + }; + + installPhase = '' + runHook preInstall + cp -r dist $out + runHook postInstall + ''; + + passthru = { + # https://github.com/etkecc/synapse-admin/blob/main/docs/config.md + withConfig = + config: + stdenv.mkDerivation { + inherit (finalAttrs) version meta; + pname = "synapse-admin-etkecc-with-config"; + dontUnpack = true; + configFile = writers.writeJSON "synapse-admin-config" config; + installPhase = '' + runHook preInstall + cp -r ${finalAttrs.finalPackage} $out + chmod -R +w $out + cp $configFile $out/config.json + runHook postInstall + ''; + }; + + updateScript = nix-update-script { }; + }; + + meta = { + description = "Maintained fork of the admin console for (Matrix) Synapse homeservers, including additional features"; + homepage = "https://github.com/etkecc/synapse-admin"; + changelog = "https://github.com/etkecc/synapse-admin/releases/tag/v${finalAttrs.version}"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ defelo ]; + }; +}) diff --git a/pkgs/by-name/ta/tail-tray/package.nix b/pkgs/by-name/ta/tail-tray/package.nix index 4b502245a003..79fbf5a6b481 100644 --- a/pkgs/by-name/ta/tail-tray/package.nix +++ b/pkgs/by-name/ta/tail-tray/package.nix @@ -39,6 +39,7 @@ stdenv.mkDerivation rec { description = "Tray icon to manage Tailscale"; homepage = "https://github.com/SneWs/tail-tray"; changelog = "https://github.com/SneWs/tail-tray/releases/tag/${version}"; + mainProgram = "tail-tray"; license = lib.licenses.gpl3Only; maintainers = with lib.maintainers; [ Svenum ]; platforms = lib.platforms.linux; diff --git a/pkgs/by-name/te/telepresence2/package.nix b/pkgs/by-name/te/telepresence2/package.nix index e5aea69a6f1a..67a04bac7181 100644 --- a/pkgs/by-name/te/telepresence2/package.nix +++ b/pkgs/by-name/te/telepresence2/package.nix @@ -8,16 +8,16 @@ let fuseftp = buildGoModule rec { pname = "go-fuseftp"; - version = "0.4.2"; + version = "0.6.6"; src = fetchFromGitHub { owner = "datawire"; repo = "go-fuseftp"; rev = "v${version}"; - hash = "sha256-bkaC+EOqFPQA4fDkVhO6EqgGhOJy31yGwVbbPoRd+70="; + hash = "sha256-70VmT8F+RNiDk6fnrzDktdfNhZk20sXF+b3TBTAkNHo="; }; - vendorHash = "sha256-Dk4wvg2lTGTw8vP42+XuvmMXeMluR0SPwlVHLEB8yCQ="; + vendorHash = "sha256-wp4jOmeVdfuRwdclCzBonNCkhgsNUBOBL6gxlrznC1A="; buildInputs = [ fuse ]; @@ -31,13 +31,13 @@ let in buildGoModule rec { pname = "telepresence2"; - version = "2.22.1"; + version = "2.22.3"; src = fetchFromGitHub { owner = "telepresenceio"; repo = "telepresence"; rev = "v${version}"; - hash = "sha256-Bae77Kzc2cWxIb1yYKXctffuiC3ICPfi0qYP6fgaqvQ="; + hash = "sha256-xrWlm5crDybvcOX3TevXcEq63Vuw0u9+4NvktIG6LxU="; }; propagatedBuildInputs = [ @@ -51,7 +51,7 @@ buildGoModule rec { export CGO_ENABLED=0 ''; - vendorHash = "sha256-toqQDa3hY2EvWjYpFXWafV9yj1U5CZXZOqQAQtOMITo="; + vendorHash = "sha256-spIdC2ZV+2tm3noyEhygoblN2BjE0w75n4I3jsrg6HI="; ldflags = [ "-s" @@ -68,6 +68,7 @@ buildGoModule rec { maintainers = with maintainers; [ mausch vilsol + wrbbz ]; mainProgram = "telepresence"; }; diff --git a/pkgs/by-name/te/termius/package.nix b/pkgs/by-name/te/termius/package.nix index 97d563d6498c..eb584cd18cb1 100644 --- a/pkgs/by-name/te/termius/package.nix +++ b/pkgs/by-name/te/termius/package.nix @@ -16,8 +16,8 @@ stdenv.mkDerivation rec { pname = "termius"; - version = "9.17.1"; - revision = "218"; + version = "9.18.1"; + revision = "220"; src = fetchurl { # find the latest version with @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { # and the sha512 with # curl -H 'X-Ubuntu-Series: 16' https://api.snapcraft.io/api/v1/snaps/details/termius-app | jq '.download_sha512' -r url = "https://api.snapcraft.io/api/v1/snaps/download/WkTBXwoX81rBe3s3OTt3EiiLKBx2QhuS_${revision}.snap"; - hash = "sha512-KmBBE+0gNq85Kb9ouynXTkC7mcTvYOMeBaW3jjBN1IK2hoCIELrwkypFWfhpPNuo2e3GA30haql0tRZ1LU/JMg=="; + hash = "sha512-IpFMTY161PlXtsr64YAdE21BupqYHxZZC7ZNbh3Zd10F1zJhVd+qAQOLOv6vdryu0HdhPv91Z1AEfz6BwLGVYA=="; }; desktopItem = makeDesktopItem { diff --git a/pkgs/by-name/ti/tideways-daemon/package.nix b/pkgs/by-name/ti/tideways-daemon/package.nix index a7842e63dd2a..a54bc0e3ca65 100644 --- a/pkgs/by-name/ti/tideways-daemon/package.nix +++ b/pkgs/by-name/ti/tideways-daemon/package.nix @@ -10,7 +10,7 @@ stdenvNoCC.mkDerivation (finalAttrs: { pname = "tideways-daemon"; - version = "1.9.36"; + version = "1.9.38"; src = finalAttrs.passthru.sources.${stdenvNoCC.hostPlatform.system} @@ -28,15 +28,15 @@ stdenvNoCC.mkDerivation (finalAttrs: { sources = { "x86_64-linux" = fetchurl { url = "https://tideways.s3.amazonaws.com/daemon/${finalAttrs.version}/tideways-daemon_linux_amd64-${finalAttrs.version}.tar.gz"; - hash = "sha256-+EnXHjFAD23jmG8IucnppjWeGNKX6yzWJypICECy3do="; + hash = "sha256-zQ8K0oHTZfQCEYAsnKsdgGaDTlRwEfCiJpd4lxy4Q5M="; }; "aarch64-linux" = fetchurl { url = "https://tideways.s3.amazonaws.com/daemon/${finalAttrs.version}/tideways-daemon_linux_aarch64-${finalAttrs.version}.tar.gz"; - hash = "sha256-p5/wzvr7EyvELADfA1X/mo8VdAT47SbAXZlIWdGZVb4="; + hash = "sha256-atRvSpc56z5Vxo5/YGz9QzCPEP79qjl2GN0vR3nkBAE="; }; "aarch64-darwin" = fetchurl { url = "https://tideways.s3.amazonaws.com/daemon/${finalAttrs.version}/tideways-daemon_macos_arm64-${finalAttrs.version}.tar.gz"; - hash = "sha256-uI7qOO7nj32BXrNFMmQlX32omT4Kxruf/J7A63QQ62w="; + hash = "sha256-+X+WbHtOFW4YGyRmj388bBH0jHezWnPfTBiiOw3LFFY="; }; }; updateScript = "${ diff --git a/pkgs/by-name/ti/tile38/package.nix b/pkgs/by-name/ti/tile38/package.nix index 292199c15153..0768b620740d 100644 --- a/pkgs/by-name/ti/tile38/package.nix +++ b/pkgs/by-name/ti/tile38/package.nix @@ -6,13 +6,13 @@ buildGoModule rec { pname = "tile38"; - version = "1.34.2"; + version = "1.34.3"; src = fetchFromGitHub { owner = "tidwall"; repo = "tile38"; tag = version; - hash = "sha256-F6mSIKivRkqbuixWyl9EmUskHsiQyzNrEt1ONvDVKrg="; + hash = "sha256-0kBSMoHo6RD6NIP4fGXe3K5B+FLEN5BuphViwa6KLSg="; }; vendorHash = "sha256-SJ80FSoG8RhsReDmSX120bxzcgZ3cD3vNvWt/HiV3/w="; diff --git a/pkgs/by-name/tm/tmux-mem-cpu-load/package.nix b/pkgs/by-name/tm/tmux-mem-cpu-load/package.nix index 53fdc8e1be0f..9de391ab6e8c 100644 --- a/pkgs/by-name/tm/tmux-mem-cpu-load/package.nix +++ b/pkgs/by-name/tm/tmux-mem-cpu-load/package.nix @@ -7,13 +7,13 @@ stdenv.mkDerivation rec { pname = "tmux-mem-cpu-load"; - version = "3.8.1"; + version = "3.8.2"; src = fetchFromGitHub { owner = "thewtex"; repo = "tmux-mem-cpu-load"; rev = "v${version}"; - sha256 = "sha256-8QUcEbgk3DSsWt9TRHHtDhQ7a1hkK8RZEX+0d3h/c0w="; + sha256 = "sha256-g++6n6OD9FAw8CtXArKBgNwFf+3v+SBCHmbma7RpMBA="; }; nativeBuildInputs = [ cmake ]; diff --git a/pkgs/by-name/tr/treefmt/build-config.nix b/pkgs/by-name/tr/treefmt/build-config.nix index 65fe7ca8f089..c4eb298a051c 100644 --- a/pkgs/by-name/tr/treefmt/build-config.nix +++ b/pkgs/by-name/tr/treefmt/build-config.nix @@ -24,6 +24,7 @@ settingsFile.overrideAttrs { passthru = { format = settingsFormat; settings = configuration.config; - inherit (configuration) _module options type; + inherit (configuration) _module options; + optionType = configuration.type; }; } diff --git a/pkgs/by-name/v2/v2ray-domain-list-community/package.nix b/pkgs/by-name/v2/v2ray-domain-list-community/package.nix index 2989d934eb78..cb26889110e2 100644 --- a/pkgs/by-name/v2/v2ray-domain-list-community/package.nix +++ b/pkgs/by-name/v2/v2ray-domain-list-community/package.nix @@ -9,12 +9,12 @@ let generator = pkgsBuildBuild.buildGoModule rec { pname = "v2ray-domain-list-community"; - version = "20250326132209"; + version = "20250415151718"; src = fetchFromGitHub { owner = "v2fly"; repo = "domain-list-community"; rev = version; - hash = "sha256-oxL9XgaTdMISdCQ37gAz4LtgV1bk09GirTtVbSOm8Z4="; + hash = "sha256-Q6/ZWwbsR8dFL6uBRFXKkuMGuWgH/VwHN3qxETbPq4k="; }; vendorHash = "sha256-NLh14rXRci4hgDkBJVJDIDvobndB7KYRKAX7UjyqSsg="; meta = with lib; { diff --git a/pkgs/by-name/ve/vesktop/package.nix b/pkgs/by-name/ve/vesktop/package.nix index 2a78c7be03b1..48c57c269c81 100644 --- a/pkgs/by-name/ve/vesktop/package.nix +++ b/pkgs/by-name/ve/vesktop/package.nix @@ -13,7 +13,7 @@ pipewire, libpulseaudio, autoPatchelfHook, - pnpm_9, + pnpm_10, nodejs, nix-update-script, withTTS ? true, @@ -24,29 +24,29 @@ }: stdenv.mkDerivation (finalAttrs: { pname = "vesktop"; - version = "1.5.5"; + version = "1.5.6"; src = fetchFromGitHub { owner = "Vencord"; repo = "Vesktop"; rev = "v${finalAttrs.version}"; - hash = "sha256-z2MKnCWDWUczoz39zzBYRB6wiSU1SRRHLpeUZeJqbLc="; + hash = "sha256-hY707k3kpfbDaRsLisVQFUeWgsxkYJ29GTdQtdeC0X4="; }; - pnpmDeps = pnpm_9.fetchDeps { + pnpmDeps = pnpm_10.fetchDeps { inherit (finalAttrs) pname version src patches ; - hash = "sha256-xn3yE2S6hfCijV+Edx3PYgGro8eF76/GqarOIRj9Tbg="; + hash = "sha256-pL4pxIB+tF9Lv5eQdLilvg/T4knjzPqBMbTxoZ3RqbI="; }; nativeBuildInputs = [ nodejs - pnpm_9.configHook + pnpm_10.configHook ] ++ lib.optionals stdenv.hostPlatform.isLinux [ # vesktop uses venmic, which is a shipped as a prebuilt node module diff --git a/pkgs/by-name/wa/walker/package.nix b/pkgs/by-name/wa/walker/package.nix index c8f596c4e730..d16a6e6e5459 100644 --- a/pkgs/by-name/wa/walker/package.nix +++ b/pkgs/by-name/wa/walker/package.nix @@ -13,13 +13,13 @@ buildGoModule rec { pname = "walker"; - version = "0.12.19"; + version = "0.12.21"; src = fetchFromGitHub { owner = "abenz1267"; repo = "walker"; rev = "v${version}"; - hash = "sha256-XOOYalJ+6V/O/fhC5gEDk2m1yZ2e5DofRRIi8ETHgoQ="; + hash = "sha256-wONW5CaPkLiVR5roGFx2SOcvcVDr9E9eCtojGBy3ErE="; }; vendorHash = "sha256-6PPNVnsH1eU4fLcZpxiBoHCzN/TUUxfTfmxDsBDPDKQ="; diff --git a/pkgs/by-name/wa/wavebox/package.nix b/pkgs/by-name/wa/wavebox/package.nix index a8a0e0b29b58..fabb5162c298 100644 --- a/pkgs/by-name/wa/wavebox/package.nix +++ b/pkgs/by-name/wa/wavebox/package.nix @@ -156,11 +156,11 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "wavebox"; - version = "10.135.5-2"; + version = "10.135.15-2"; src = fetchurl { url = "https://download.wavebox.app/stable/linux/deb/amd64/wavebox_${finalAttrs.version}_amd64.deb"; - hash = "sha256-TTRTQI7CwAs4H47pkCo50yuoXsrD7DXyTyYQDycP9e8="; + hash = "sha256-nQWaPDHkwBjV7IUYf+e1NkYzXpnV15XZmqkT/Vz16Gc="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/we/weblate/package.nix b/pkgs/by-name/we/weblate/package.nix index 6eceade528b3..b669fdfb9f93 100644 --- a/pkgs/by-name/we/weblate/package.nix +++ b/pkgs/by-name/we/weblate/package.nix @@ -152,6 +152,11 @@ python.pkgs.buildPythonApplication rec { postgres = with python.pkgs; [ psycopg ]; }; + pythonRelaxDeps = [ + "celery" + "rapidfuzz" + ]; + # We don't just use wrapGAppsNoGuiHook because we need to expose GI_TYPELIB_PATH GI_TYPELIB_PATH = lib.makeSearchPathOutput "out" "lib/girepository-1.0" [ pango diff --git a/pkgs/by-name/we/werf/package.nix b/pkgs/by-name/we/werf/package.nix index 98b7f159bd24..c40d3dcda16d 100644 --- a/pkgs/by-name/we/werf/package.nix +++ b/pkgs/by-name/we/werf/package.nix @@ -10,17 +10,17 @@ }: buildGoModule (finalAttrs: { pname = "werf"; - version = "2.34.1"; + version = "2.35.3"; src = fetchFromGitHub { owner = "werf"; repo = "werf"; tag = "v${finalAttrs.version}"; - hash = "sha256-hWkU3tyh0kQ9GNl5gQIs4wTRBQV0B3/0oOAhKLo1hOo="; + hash = "sha256-ebbc8pKZ8QkxGq9MttpulBkQLXcjH25Zoq8owxIamKg="; }; proxyVendor = true; - vendorHash = "sha256-x9ehxBfyk5sMg71yJcyjcrBAi5bzEnENAaqLXFoGQck="; + vendorHash = "sha256-Bgi8Pd7lON0DTSzHKaHHbqdS9S/i01tJV/x5bgmiWCo="; subPackages = [ "cmd/werf" ]; diff --git a/pkgs/by-name/ws/wstunnel/package.nix b/pkgs/by-name/ws/wstunnel/package.nix index cde6e4aa5548..c95feabf1d83 100644 --- a/pkgs/by-name/ws/wstunnel/package.nix +++ b/pkgs/by-name/ws/wstunnel/package.nix @@ -8,7 +8,7 @@ }: let - version = "10.1.10"; + version = "10.1.11"; in rustPlatform.buildRustPackage { @@ -19,11 +19,11 @@ rustPlatform.buildRustPackage { owner = "erebe"; repo = "wstunnel"; tag = "v${version}"; - hash = "sha256-7HW2AtMTNE05qSBhltj+ZxJhoMJmaMynko8+wIgpqCc="; + hash = "sha256-CtJws2O5ywR2prIlDoMbsPi6SH+ffxdqfCKUByukqpA="; }; useFetchCargoVendor = true; - cargoHash = "sha256-NujasFigZ+BETg3J8fOKu5QAm68ZzP7uIXwv7bI+2uM="; + cargoHash = "sha256-YZrScEdRNZ/RU3PBRThw29Yu04N42nwe5DLLABRZtLw="; cargoBuildFlags = [ "--package wstunnel-cli" ]; diff --git a/pkgs/by-name/xk/xk6/package.nix b/pkgs/by-name/xk/xk6/package.nix index 0ad9b244d0e0..62463375c89c 100644 --- a/pkgs/by-name/xk/xk6/package.nix +++ b/pkgs/by-name/xk/xk6/package.nix @@ -9,13 +9,13 @@ buildGoModule rec { pname = "xk6"; - version = "0.16.1"; + version = "0.18.0"; src = fetchFromGitHub { owner = "grafana"; repo = "xk6"; tag = "v${version}"; - hash = "sha256-fUlK0/P64gCGPek79mYNbL/1PbrZxD9D3Werh9Oe/6k="; + hash = "sha256-Ob9H3EMEo611Ivyu2UoR7ZHXvWPjJAR4T0HBTRhmH+M="; }; vendorHash = null; diff --git a/pkgs/by-name/ya/yazi/plugins/piper/default.nix b/pkgs/by-name/ya/yazi/plugins/piper/default.nix new file mode 100644 index 000000000000..a3ccbff392ae --- /dev/null +++ b/pkgs/by-name/ya/yazi/plugins/piper/default.nix @@ -0,0 +1,23 @@ +{ + lib, + fetchFromGitHub, + mkYaziPlugin, +}: +mkYaziPlugin { + pname = "piper.yazi"; + version = "25.4.8-unstable-2025-04-13"; + + src = fetchFromGitHub { + owner = "yazi-rs"; + repo = "plugins"; + rev = "b12a9ab085a8c2fe2b921e1547ee667b714185f9"; + hash = "sha256-LWN0riaUazQl3llTNNUMktG+7GLAHaG/IxNj1gFhDRE="; + }; + + meta = { + description = "Pipe any shell command as a previewer"; + homepage = "https://yazi-rs.github.io"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ khaneliman ]; + }; +} diff --git a/pkgs/by-name/ye/yelp-xsl/cve-2025-3155.patch b/pkgs/by-name/ye/yelp-xsl/cve-2025-3155.patch new file mode 100644 index 000000000000..36886d7c4a2a --- /dev/null +++ b/pkgs/by-name/ye/yelp-xsl/cve-2025-3155.patch @@ -0,0 +1,79 @@ +diff --git a/xslt/common/html.xsl b/xslt/common/html.xsl +index 77aed075..82832fb4 100644 +--- a/xslt/common/html.xsl ++++ b/xslt/common/html.xsl +@@ -266,6 +266,16 @@ certain tokens, and you can add your own with {html.sidebar.mode}. See + --> + + ++ ++ + + +-