Merge staging-next into staging

This commit is contained in:
github-actions[bot] 2024-12-04 18:05:21 +00:00 committed by GitHub
commit 31c37acde9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 103 additions and 31 deletions

View file

@ -306,35 +306,29 @@ in
As a result, directories with no `.nix` files (including empty
directories) will be transformed into empty attribute sets.
# Inputs
Structured function argument
: Attribute set containing the following attributes.
Additional attributes are ignored.
`callPackage`
: `pkgs.callPackage`
Type: `Path -> AttrSet -> a`
`directory`
: The directory to read package files from
Type: `Path`
# Type
```
packagesFromDirectoryRecursive :: AttrSet -> AttrSet
packagesFromDirectoryRecursive :: {
callPackage :: Path -> {} -> a,
directory :: Path,
...
} -> AttrSet
```
# Inputs
`callPackage`
: The function used to convert a Nix file's path into a leaf of the attribute set.
It is typically the `callPackage` function, taken from either `pkgs` or a new scope corresponding to the `directory`.
`directory`
: The directory to read package files from.
# Examples
:::{.example}
## `lib.filesystem.packagesFromDirectoryRecursive` usage example
## Basic use of `lib.packagesFromDirectoryRecursive`
```nix
packagesFromDirectoryRecursive {
@ -342,17 +336,48 @@ in
directory = ./my-packages;
}
=> { ... }
```
In this case, `callPackage` will only search `pkgs` for a file's input parameters.
In other words, a file cannot refer to another file in the directory in its input parameters.
:::
::::{.example}
## Create a scope for the nix files found in a directory
```nix
lib.makeScope pkgs.newScope (
self: packagesFromDirectoryRecursive {
callPackage = self.callPackage;
inherit (self) callPackage;
directory = ./my-packages;
}
)
=> { ... }
```
For example, take the following directory structure:
```
my-packages
a.nix { b }: assert b ? b1; ...
b
b1.nix { a }: ...
b2.nix
```
Here, `b1.nix` can specify `{ a }` as a parameter, which `callPackage` will resolve as expected.
Likewise, `a.nix` receive an attrset corresponding to the contents of the `b` directory.
:::{.note}
`a.nix` cannot directly take as inputs packages defined in a child directory, such as `b1`.
:::
:::{.warning}
As of now, `lib.packagesFromDirectoryRecursive` cannot create nested scopes for sub-directories.
In particular, files under `b/` can only require (as inputs) other files under `my-packages`,
but not to those in the same directory, nor those in a parent directory; e.g, `b2.nix` cannot directly
require `b1`.
:::
::::
*/
packagesFromDirectoryRecursive =
{

View file

@ -0,0 +1,40 @@
{
lib,
buildLua,
fetchFromGitHub,
makeFontsConf,
nix-update-script,
}:
buildLua (finalAttrs: {
pname = "modernx";
version = "0.2.1";
scriptPath = "modernz.lua";
src = fetchFromGitHub {
owner = "Samillion";
repo = "ModernZ";
rev = "v${finalAttrs.version}";
hash = "sha256-Zk7AC8p14ejsIXwDXladOlQ6jm4NUiU4PxPi5ssBVx8=";
};
postInstall = ''
install -Dt $out/share/fonts *.ttf
'';
passthru.extraWrapperArgs = [
"--set"
"FONTCONFIG_FILE"
(toString (makeFontsConf {
fontDirectories = [ "${finalAttrs.finalPackage}/share/fonts" ];
}))
];
passthru.updateScript = nix-update-script { };
meta = {
description = "Sleek and modern OSC for mpv designed to enhance functionality by adding more features, all while preserving the core standards of mpv's OSC";
homepage = "https://github.com/Samillion/ModernZ";
license = lib.licenses.lgpl21Plus;
maintainers = with lib.maintainers; [ Guanran928 ];
};
})

View file

@ -11,14 +11,14 @@
# all get the same sources with the same patches applied.
stdenv.mkDerivation rec {
version = "10.5.rc0";
version = "10.5";
pname = "sage-src";
src = fetchFromGitHub {
owner = "sagemath";
repo = "sage";
rev = version;
hash = "sha256-qjgEgyPOpT/g7D8YNhkqO1EHGNftZnuR5ucLNZBa9Sg=";
hash = "sha256-OiGMc3KyHWnjVWXJ/KiqEQS1skM9nPLYcoMK9kw4718=";
};
# contains essential files (e.g., setup.cfg) generated by the bootstrap script.
@ -26,8 +26,8 @@ stdenv.mkDerivation rec {
configure-src = fetchurl {
# the hash below is the tagged commit's _parent_. it can also be found by looking for
# the "configure" asset at https://github.com/sagemath/sage/releases/tag/${version}
url = "mirror://sageupstream/configure/configure-d9c38a7c581e6ed54fbe420122b8bba488b16074.tar.gz";
hash = "sha256-y1EpsuYK9wloptjeiTew+TZaIUZ2K/NKCbSteojFa4s=";
url = "mirror://sageupstream/configure/configure-f6ad0ecf1f4a269f5954d5487336b13f70624594.tar.gz";
hash = "sha256-VANtZDUhjOHap9XVEuG/1003E+1XRdXEnuH15hIqJd4=";
};
# Patches needed because of particularities of nix or the way this is packaged.
@ -57,6 +57,13 @@ stdenv.mkDerivation rec {
# compile libs/gap/element.pyx with -O1
# a more conservative version of https://github.com/sagemath/sage/pull/37951
./patches/gap-element-crash.patch
# https://github.com/sagemath/sage/pull/38940, positively reviewed, to land in 10.6.beta0
(fetchpatch {
name = "simplicial-sets-flaky-test.patch";
url = "https://github.com/sagemath/sage/commit/1830861c5130d30b891e8c643308e1ceb91ce2b5.diff";
hash = "sha256-6MbZ+eJPFBEtnJsJX0MgO2AykPXSeuya0W0adiIH+KE=";
})
];
# Patches needed because of package updates. We could just pin the versions of

View file

@ -2,7 +2,7 @@
, libxml2, gnutls, sane-backends }:
stdenv.mkDerivation rec {
pname = "sane-airscan";
version = "0.99.29";
version = "0.99.30";
nativeBuildInputs = [ meson ninja pkg-config ];
buildInputs = [ avahi gnutls libjpeg libpng libxml2 libtiff sane-backends ];
@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
owner = "alexpevzner";
repo = pname;
rev = version;
sha256 = "sha256-9ErTC9NztyO9o6y2FjQPl2lu1gICasZYm2tnaCVCLt8=";
sha256 = "sha256-JNgKZZuNRB02c+nOjtFj8L5wDY8ErZcv00nYweYULaM=";
};
meta = with lib; {

View file

@ -12,12 +12,12 @@
buildPythonPackage rec {
pname = "pulsectl";
version = "24.8.0";
version = "24.11.0";
format = "setuptools";
src = fetchPypi {
inherit pname version;
hash = "sha256-sFFQbQ1z08xDV879PeF7uFnX7PAE6ZSw98+oeFG8cVY=";
hash = "sha256-C6MnRdPxmNVlevGffuPrAHr1qGowbsPNRa9C52eCDQ0=";
};
patches = [