Skip to content

Commit

Permalink
Merge staging-next into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Mar 31, 2024
2 parents 5f43b93 + 07f01fb commit c8275d7
Show file tree
Hide file tree
Showing 84 changed files with 1,337 additions and 1,300 deletions.
17 changes: 6 additions & 11 deletions doc/languages-frameworks/coq.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,17 @@ Here is a simple package example. It is a pure Coq library, thus it depends on C
{ lib, mkCoqDerivation, version ? null
, coq, mathcomp, mathcomp-finmap, mathcomp-bigenough }:
let
inherit (lib) licenses maintainers switch;
inherit (lib.versions) range;
in
mkCoqDerivation {
/* 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 versions; switch [ coq.version mathcomp.version ] [
{ cases = [ (range "8.7" "8.12") "1.11.0" ]; 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 = [ "8.6" (range "1.6" "1.7") ]; out = "1.1"; }
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".sha256 = "15aspf3jfykp1xgsxf8knqkxv8aav2p39c2fyirw7pwsfbsv2c4s";
Expand All @@ -90,7 +85,7 @@ mkCoqDerivation {
meta = {
description = "A Coq/SSReflect Library for Monoidal Rings and Multinomials";
license = licenses.cecill-c;
license = lib.licenses.cecill-c;
};
}
```
Expand Down
20 changes: 10 additions & 10 deletions doc/languages-frameworks/javascript.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,16 @@ If a particular lock file is present, it is a strong indication of which package
It's better to try to use a Nix tool that understand the lock file.
Using a different tool might give you hard to understand error because different packages have been installed.
An example of problems that could arise can be found [here](https://github.com/NixOS/nixpkgs/pull/126629).
Upstream use NPM, but this is an attempt to package it with `yarn2nix` (that uses yarn.lock).
Upstream use npm, but this is an attempt to package it with `yarn2nix` (that uses yarn.lock).

Using a different tool forces to commit a lock file to the repository.
Those files are fairly large, so when packaging for nixpkgs, this approach does not scale well.

Exceptions to this rule are:

- When you encounter one of the bugs from a Nix tool. In each of the tool specific instructions, known problems will be detailed. If you have a problem with a particular tool, then it's best to try another tool, even if this means you will have to recreate a lock file and commit it to nixpkgs. In general `yarn2nix` has less known problems and so a simple search in nixpkgs will reveal many yarn.lock files committed.
- Some lock files contain particular version of a package that has been pulled off NPM for some reason. In that case, you can recreate upstream lock (by removing the original and `npm install`, `yarn`, ...) and commit this to nixpkgs.
- The only tool that supports workspaces (a feature of NPM that helps manage sub-directories with different package.json from a single top level package.json) is `yarn2nix`. If upstream has workspaces you should try `yarn2nix`.
- Some lock files contain particular version of a package that has been pulled off npm for some reason. In that case, you can recreate upstream lock (by removing the original and `npm install`, `yarn`, ...) and commit this to nixpkgs.
- The only tool that supports workspaces (a feature of npm that helps manage sub-directories with different package.json from a single top level package.json) is `yarn2nix`. If upstream has workspaces you should try `yarn2nix`.

### Try to use upstream package.json {#javascript-upstream-package-json}

Expand Down Expand Up @@ -97,12 +97,12 @@ Then when building the frontend you can just symlink the node_modules directory.

## Javascript packages inside nixpkgs {#javascript-packages-nixpkgs}

The [pkgs/development/node-packages](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/node-packages) folder contains a generated collection of [NPM packages](https://npmjs.com/) that can be installed with the Nix package manager.
The [pkgs/development/node-packages](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/node-packages) folder contains a generated collection of [npm packages](https://npmjs.com/) that can be installed with the Nix package manager.

As a rule of thumb, the package set should only provide _end user_ software packages, such as command-line utilities.
Libraries should only be added to the package set if there is a non-NPM package that requires it.
Libraries should only be added to the package set if there is a non-npm package that requires it.

When it is desired to use NPM libraries in a development project, use the `node2nix` generator directly on the `package.json` configuration file of the project.
When it is desired to use npm libraries in a development project, use the `node2nix` generator directly on the `package.json` configuration file of the project.

The package set provides support for the official stable Node.js versions.
The latest stable LTS release in `nodePackages`, as well as the latest stable current release in `nodePackages_latest`.
Expand All @@ -127,7 +127,7 @@ For example, `dat` requires `node-gyp-build`, so we override its expression in [

### Adding and Updating Javascript packages in nixpkgs {#javascript-adding-or-updating-packages}

To add a package from NPM to nixpkgs:
To add a package from npm to nixpkgs:

1. Modify [pkgs/development/node-packages/node-packages.json](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/node-packages/node-packages.json) to add, update or remove package entries to have it included in `nodePackages` and `nodePackages_latest`.
2. Run the script:
Expand All @@ -154,7 +154,7 @@ To add a package from NPM to nixpkgs:
For more information about the generation process, consult the [README.md](https://github.com/svanderburg/node2nix) file of the `node2nix` tool.
To update NPM packages in nixpkgs, run the same `generate.sh` script:
To update npm packages in nixpkgs, run the same `generate.sh` script:
```sh
./pkgs/development/node-packages/generate.sh
Expand Down Expand Up @@ -307,8 +307,8 @@ See `node2nix` [docs](https://github.com/svanderburg/node2nix) for more info.
#### Pitfalls {#javascript-node2nix-pitfalls}

- If upstream package.json does not have a "version" attribute, `node2nix` will crash. You will need to add it like shown in [the package.json section](#javascript-upstream-package-json).
- `node2nix` has some [bugs](https://github.com/svanderburg/node2nix/issues/238) related to working with lock files from NPM distributed with `nodejs_16`.
- `node2nix` does not like missing packages from NPM. If you see something like `Cannot resolve version: vue-loader-v16@undefined` then you might want to try another tool. The package might have been pulled off of NPM.
- `node2nix` has some [bugs](https://github.com/svanderburg/node2nix/issues/238) related to working with lock files from npm distributed with `nodejs_16`.
- `node2nix` does not like missing packages from npm. If you see something like `Cannot resolve version: vue-loader-v16@undefined` then you might want to try another tool. The package might have been pulled off of npm.

### yarn2nix {#javascript-yarn2nix}

Expand Down
20 changes: 20 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7647,6 +7647,12 @@
githubId = 22756350;
name = "Emile Hansmaennel";
};
HannahMR = {
name = "Hannah Rosenberg";
email = "[email protected]";
github = "HannahMR";
githubId = 9088467;
};
hansjoergschurr = {
email = "[email protected]";
github = "hansjoergschurr";
Expand Down Expand Up @@ -10107,6 +10113,11 @@
githubId = 15855440;
name = "Keanu Ashwell";
};
katanallama = {
github = "katanallama";
githubId = 70604257;
name = "katanallama";
};
katexochen = {
github = "katexochen";
githubId = 49727155;
Expand Down Expand Up @@ -21306,6 +21317,15 @@
githubId = 8378365;
name = "P. R. d. O.";
};
wolfgangwalther = {
name = "Wolfgang Walther";
email = "[email protected]";
github = "wolfgangwalther";
githubId = 9132420;
keys = [{
fingerprint = "F943 A0BC 720C 5BEF 73CD E02D B398 93FA 5F65 CAE1";
}];
};
womfoo = {
email = "[email protected]";
github = "womfoo";
Expand Down
2 changes: 2 additions & 0 deletions nixos/doc/manual/release-notes/rl-2405.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m

- `paperless`' `services.paperless.extraConfig` setting has been removed and converted to the freeform type and option named `services.paperless.settings`.

- `davfs2`' `services.davfs2.extraConfig` setting has been deprecated and converted to the freeform type option named `services.davfs2.settings` according to RFC42.

- `services.homepage-dashboard` now takes it's configuration using native Nix expressions, rather than dumping templated configurations into `/var/lib/homepage-dashboard` where they were previously managed manually. There are now new options which allow the configuration of bookmarks, services, widgets and custom CSS/JS natively in Nix.

- `hare` may now be cross-compiled. For that to work, however, `haredoc` needed to stop being built together with it. Thus, the latter is now its own package with the name of `haredoc`.
Expand Down
49 changes: 45 additions & 4 deletions nixos/modules/services/network-filesystems/davfs2.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,22 @@
with lib;

let
toStr = value:
if true == value then "yes"
else if false == value then "no"
else toString value;

cfg = config.services.davfs2;
cfgFile = pkgs.writeText "davfs2.conf" ''
dav_user ${cfg.davUser}
dav_group ${cfg.davGroup}
format = pkgs.formats.toml { };
configFile = let
settings = mapAttrsToList (n: v: "${n} = ${toStr v}") cfg.settings;
in pkgs.writeText "davfs2.conf" ''
${concatStringsSep "\n" settings}
${cfg.extraConfig}
'';
in
{

options.services.davfs2 = {
enable = mkOption {
type = types.bool;
Expand Down Expand Up @@ -49,13 +57,46 @@ in
'';
description = lib.mdDoc ''
Extra lines appended to the configuration of davfs2.
See {manpage}`davfs2.conf(5)` for available settings.
**Note**: Please pass structured settings via
{option}`settings` instead, this option
will get deprecated in the future.
'' ;
};

settings = mkOption {
type = types.submodule {
freeformType = format.type;
};
default = {};
example = literalExpression ''
{
kernel_fs = "coda";
proxy = "foo.bar:8080";
use_locks = 0;
}
'';
description = lib.mdDoc ''
Extra settings appended to the configuration of davfs2.
See {manpage}`davfs2.conf(5)` for available settings.
'' ;
};
};

config = mkIf cfg.enable {

warnings = lib.optional (cfg.extraConfig != null) ''
services.davfs2.extraConfig will be deprecated in future releases, please use the settings option now.
'';

environment.systemPackages = [ pkgs.davfs2 ];
environment.etc."davfs2/davfs2.conf".source = cfgFile;
environment.etc."davfs2/davfs2.conf".source = configFile;

services.davfs2.settings = {
dav_user = cfg.davUser;
dav_group = cfg.davGroup;
};

users.groups = optionalAttrs (cfg.davGroup == "davfs2") {
davfs2.gid = config.ids.gids.davfs2;
Expand Down
8 changes: 4 additions & 4 deletions pkgs/applications/blockchains/aperture/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@

buildGoModule rec {
pname = "aperture";
version = "0.2-beta";
version = "0.3-beta";

src = fetchFromGitHub {
owner = "lightninglabs";
repo = "aperture";
rev = "v${version}";
hash = "sha256-l1fpjCAg+1PGNotKrjFLoYOMEzRNXC1mfdjRPfE0DsY=";
hash = "sha256-PsmaNJxWkXiFDA7IGhT+Kx1GUvv23c8L8Jz21/b48oo=";
};

vendorHash = "sha256-tWFFmRSDUZXijAUTgR8k4EERHwIEBOyZZZ9BGXso/tU=";
vendorHash = "sha256-rrDLdE7c6ykhdqOfRpuxyRO4xqYp3LZvovAppzy1wVw=";

subPackages = [ "cmd/aperture" ];

meta = with lib; {
description = "L402 (Lightning HTTP 402) Reverse Proxy";
homepage = "https://github.com/lightninglabs/aperture";
license = licenses.mit;
maintainers = with maintainers; [ sputn1ck ];
maintainers = with maintainers; [ sputn1ck HannahMR ];
mainProgram = "aperture";
};
}
12 changes: 12 additions & 0 deletions pkgs/applications/editors/vim/plugins/generated.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17069,5 +17069,17 @@ final: prev:
meta.homepage = "https://github.com/backdround/improved-search.nvim/";
};

qmk-nvim = buildVimPlugin {
pname = "qmk-nvim";
version = "2024-02-15";
src = fetchFromGitHub {
owner = "codethread";
repo = "qmk.nvim";
rev = "67c1a94b10f7266ac01b0a2431dade70693edba9";
sha256 = "sha256-YKp9/unDL52guKRHI50DSPV8nXyPqAHY9mEHUMHFhmc=";
};
meta.homepage = "https://github.com/codethread/qmk.nvim/";
};


}
1 change: 1 addition & 0 deletions pkgs/applications/editors/vim/plugins/vim-plugin-names
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,7 @@ https://github.com/purescript-contrib/purescript-vim/,,
https://github.com/python-mode/python-mode/,,
https://github.com/vim-python/python-syntax/,,
https://github.com/AlphaTechnolog/pywal.nvim/,,
https://github.com/codethread/qmk.nvim/,HEAD,
https://github.com/quarto-dev/quarto-nvim/,,
https://github.com/unblevable/quick-scope/,,
https://github.com/stefandtw/quickfix-reflector.vim/,,
Expand Down
34 changes: 27 additions & 7 deletions pkgs/applications/editors/vscode/extensions/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -411,12 +411,12 @@ let
mktplcRef = {
name = "astro-vscode";
publisher = "astro-build";
version = "2.3.3";
sha256 = "sha256-A7+7lnCPAtSWUfHLNKbYqKuTxi2Nx05Qdh5HCkT1dnM=";
version = "2.8.3";
sha256 = "sha256-A6m31eZMlOHF0yr9MjXmsFyXgH8zmq6WLRd/w85hGw0=";
};
meta = {
changelog = "https://marketplace.visualstudio.com/items/astro-build.astro-vscode/changelog";
description = "Astro language support for VSCode";
description = "Astro language support for VS Code";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=astro-build.astro-vscode";
homepage = "https://github.com/withastro/language-tools";
license = lib.licenses.mit;
Expand Down Expand Up @@ -2852,10 +2852,13 @@ let
mktplcRef = {
name = "vscode-docker";
publisher = "ms-azuretools";
version = "1.24.0";
sha256 = "sha256-zZ34KQrRPqVbfGdpYACuLMiMj4ZIWSnJIPac1yXD87k=";
version = "1.29.0";
sha256 = "sha256-mVRsVsolXj31WhbWnt3Xml+NnIq7Q2uHhUUd1zgW42c=";
};
meta = {
description = "Docker Extension for Visual Studio Code";
homepage = "https://github.com/microsoft/vscode-docker";
changelog = "https://marketplace.visualstudio.com/items/ms-azuretools.vscode-docker/changelog";
license = lib.licenses.mit;
};
};
Expand Down Expand Up @@ -2948,6 +2951,23 @@ let
};
};

ms-toolsai.datawrangler = buildVscodeMarketplaceExtension {
mktplcRef = {
name = "datawrangler";
publisher = "ms-toolsai";
version = "0.29.6";
sha256 = "sha256-9MR2+hb9YdjIGDfUkdLW41HOxhjeS/San49C8QRZ/YY=";
};

meta = {
description = "Data viewing, cleaning and preparation for tabular datasets";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=ms-toolsai.datawrangler";
homepage = "https://github.com/microsoft/vscode-data-wrangler";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.katanallama ];
};
};

ms-toolsai.jupyter = callPackage ./ms-toolsai.jupyter { };

ms-toolsai.jupyter-keymap = buildVscodeMarketplaceExtension {
Expand Down Expand Up @@ -4020,8 +4040,8 @@ let
mktplcRef = {
name = "svelte-vscode";
publisher = "svelte";
version = "107.12.0";
sha256 = "036ri011fd0cf91iwv59j57m05mxliy27ms4di2y9jlk7jzmr4s2";
version = "108.3.3";
sha256 = "sha256-q7w8DPzBLpD+13v7RnyDdC3ocDKAihHBVt3pnwSTwio=";
};
meta = {
changelog = "https://github.com/sveltejs/language-tools/releases";
Expand Down
6 changes: 3 additions & 3 deletions pkgs/applications/misc/oxker/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

rustPlatform.buildRustPackage rec {
pname = "oxker";
version = "0.6.1";
version = "0.6.2";

src = fetchCrate {
inherit pname version;
sha256 = "sha256-cUM9+6BZcsrb850fm5mFWpo7/JmxwNDh+upHeE7+DU8=";
sha256 = "sha256-pHyIL5Jmldsa0ZNMiYpBD+9zxPv8Blg23nnWD2YmHMI=";
};

cargoHash = "sha256-sFBI/+7oGjjUyr3PBkkqdgprGdcaYHtOvqFpkrF4Qx8=";
cargoHash = "sha256-N1Cv89njL9QCIs3HclcjsqgSUSMEckis8zyVqepeW70=";

meta = with lib; {
description = "A simple tui to view & control docker containers";
Expand Down
Loading

0 comments on commit c8275d7

Please sign in to comment.