Merge master into staging-next
This commit is contained in:
commit
e1353d0d8d
@ -73,7 +73,10 @@ let
|
||||
defaultPkgs =
|
||||
if opt.hostPlatform.isDefined then
|
||||
let
|
||||
isCross = cfg.buildPlatform != cfg.hostPlatform;
|
||||
isCross =
|
||||
!(lib.systems.equals (lib.systems.elaborate cfg.buildPlatform) (
|
||||
lib.systems.elaborate cfg.hostPlatform
|
||||
));
|
||||
systemArgs =
|
||||
if isCross then
|
||||
{
|
||||
@ -195,13 +198,10 @@ in
|
||||
};
|
||||
|
||||
hostPlatform = lib.mkOption {
|
||||
type = lib.types.either lib.types.str lib.types.attrs; # TODO utilize lib.systems.parsedPlatform
|
||||
type = lib.types.either lib.types.str lib.types.attrs;
|
||||
example = {
|
||||
system = "aarch64-linux";
|
||||
};
|
||||
# Make sure that the final value has all fields for sake of other modules
|
||||
# referring to this. TODO make `lib.systems` itself use the module system.
|
||||
apply = lib.systems.elaborate;
|
||||
defaultText = lib.literalExpression ''(import "''${nixos}/../lib").lib.systems.examples.aarch64-multiplatform'';
|
||||
description = ''
|
||||
Specifies the platform where the NixOS configuration will run.
|
||||
@ -213,22 +213,13 @@ in
|
||||
};
|
||||
|
||||
buildPlatform = lib.mkOption {
|
||||
type = lib.types.either lib.types.str lib.types.attrs; # TODO utilize lib.systems.parsedPlatform
|
||||
type = lib.types.either lib.types.str lib.types.attrs;
|
||||
default = cfg.hostPlatform;
|
||||
example = {
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
# Make sure that the final value has all fields for sake of other modules
|
||||
# referring to this.
|
||||
apply =
|
||||
inputBuildPlatform:
|
||||
let
|
||||
elaborated = lib.systems.elaborate inputBuildPlatform;
|
||||
in
|
||||
if lib.systems.equals elaborated cfg.hostPlatform then
|
||||
cfg.hostPlatform # make identical, so that `==` equality works; see https://github.com/NixOS/nixpkgs/issues/278001
|
||||
else
|
||||
elaborated;
|
||||
defaultText = lib.literalExpression ''config.nixpkgs.hostPlatform'';
|
||||
description = ''
|
||||
Specifies the platform on which NixOS should be built.
|
||||
@ -245,14 +236,11 @@ in
|
||||
};
|
||||
|
||||
localSystem = lib.mkOption {
|
||||
type = lib.types.attrs; # TODO utilize lib.systems.parsedPlatform
|
||||
type = lib.types.attrs;
|
||||
default = { inherit (cfg) system; };
|
||||
example = {
|
||||
system = "aarch64-linux";
|
||||
};
|
||||
# Make sure that the final value has all fields for sake of other modules
|
||||
# referring to this. TODO make `lib.systems` itself use the module system.
|
||||
apply = lib.systems.elaborate;
|
||||
defaultText = lib.literalExpression ''(import "''${nixos}/../lib").lib.systems.examples.aarch64-multiplatform'';
|
||||
description = ''
|
||||
Systems with a recently generated `hardware-configuration.nix`
|
||||
@ -280,7 +268,7 @@ in
|
||||
# is a relation between at least 2 systems in the context of a
|
||||
# specific build step, not a single system.
|
||||
crossSystem = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.attrs; # TODO utilize lib.systems.parsedPlatform
|
||||
type = lib.types.nullOr lib.types.attrs;
|
||||
default = null;
|
||||
example = {
|
||||
system = "aarch64-linux";
|
||||
@ -416,6 +404,18 @@ in
|
||||
${lib.concatMapStringsSep "\n" (file: " - ${file}") opt.config.files}
|
||||
'';
|
||||
}
|
||||
{
|
||||
assertion =
|
||||
(opt.hostPlatform.isDefined -> builtins.isAttrs cfg.buildPlatform -> !(cfg.buildPlatform ? parsed))
|
||||
&& (opt.hostPlatform.isDefined -> builtins.isAttrs cfg.hostPlatform -> !(cfg.hostPlatform ? parsed))
|
||||
&& (builtins.isAttrs cfg.localSystem -> !(cfg.localSystem ? parsed))
|
||||
&& (builtins.isAttrs cfg.crossSystem -> !(cfg.crossSystem ? parsed));
|
||||
message = ''
|
||||
Passing fully elaborated systems to `nixpkgs.localSystem`, `nixpkgs.crossSystem`, `nixpkgs.buildPlatform`
|
||||
or `nixpkgs.hostPlatform` will break composability of package sets in nixpkgs. For example, pkgs.pkgsStatic
|
||||
would not work in modules anymore.
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
@ -40,20 +40,11 @@ in
|
||||
The Nixpkgs overlays that `pkgs` was initialized with.
|
||||
'';
|
||||
};
|
||||
hostPlatform = mkOption {
|
||||
internal = true;
|
||||
readOnly = true;
|
||||
description = ''
|
||||
The platform of the machine that is running the NixOS configuration.
|
||||
'';
|
||||
};
|
||||
buildPlatform = mkOption {
|
||||
internal = true;
|
||||
readOnly = true;
|
||||
description = ''
|
||||
The platform of the machine that built the NixOS configuration.
|
||||
'';
|
||||
};
|
||||
# buildPlatform and hostPlatform left out on purpose:
|
||||
# - They are not supposed to be changed with this read-only module.
|
||||
# - They are not supposed to be read either, according to the description
|
||||
# of "system" in the traditional nixpkgs module.
|
||||
#
|
||||
# NOTE: do not add the legacy options such as localSystem here. Let's keep
|
||||
# this module simple and let module authors upgrade their code instead.
|
||||
};
|
||||
@ -61,12 +52,8 @@ in
|
||||
config = {
|
||||
_module.args.pkgs =
|
||||
# find mistaken definitions
|
||||
builtins.seq cfg.config builtins.seq cfg.overlays builtins.seq cfg.hostPlatform builtins.seq
|
||||
cfg.buildPlatform
|
||||
cfg.pkgs;
|
||||
builtins.seq cfg.config builtins.seq cfg.overlays cfg.pkgs;
|
||||
nixpkgs.config = cfg.pkgs.config;
|
||||
nixpkgs.overlays = cfg.pkgs.overlays;
|
||||
nixpkgs.hostPlatform = cfg.pkgs.stdenv.hostPlatform;
|
||||
nixpkgs.buildPlatform = cfg.pkgs.stdenv.buildPlatform;
|
||||
};
|
||||
}
|
||||
|
||||
@ -506,8 +506,12 @@ in
|
||||
config = {
|
||||
nixpkgs =
|
||||
if options.nixpkgs?hostPlatform
|
||||
then { inherit (host.pkgs.stdenv) hostPlatform; }
|
||||
else { localSystem = host.pkgs.stdenv.hostPlatform; }
|
||||
then {
|
||||
hostPlatform =
|
||||
if host.options.nixpkgs.hostPlatform.isDefined
|
||||
then host.config.nixpkgs.hostPlatform
|
||||
else lib.defaultTo host.config.nixpkgs.localSystem host.config.nixpkgs.crossSystem;
|
||||
} else { localSystem = lib.defaultTo host.config.nixpkgs.localSystem host.config.nixpkgs.crossSystem; }
|
||||
;
|
||||
boot.isContainer = true;
|
||||
networking.hostName = mkDefault name;
|
||||
|
||||
@ -40,7 +40,7 @@
|
||||
verityStore = {
|
||||
enable = true;
|
||||
# by default the module works with systemd-boot, for simplicity this test directly boots the UKI
|
||||
ukiPath = "/EFI/BOOT/BOOT${lib.toUpper config.nixpkgs.hostPlatform.efiArch}.EFI";
|
||||
ukiPath = "/EFI/BOOT/BOOT${lib.toUpper pkgs.stdenv.hostPlatform.efiArch}.EFI";
|
||||
};
|
||||
|
||||
name = "appliance-verity-store-image";
|
||||
@ -51,7 +51,7 @@
|
||||
repartConfig = {
|
||||
Type = "esp";
|
||||
Format = "vfat";
|
||||
SizeMinBytes = if config.nixpkgs.hostPlatform.isx86_64 then "64M" else "96M";
|
||||
SizeMinBytes = if pkgs.stdenv.hostPlatform.isx86_64 then "64M" else "96M";
|
||||
};
|
||||
};
|
||||
${partitionIds.store-verity}.repartConfig = {
|
||||
|
||||
@ -53,7 +53,7 @@ in
|
||||
"esp" = {
|
||||
contents =
|
||||
let
|
||||
efiArch = config.nixpkgs.hostPlatform.efiArch;
|
||||
efiArch = pkgs.stdenv.hostPlatform.efiArch;
|
||||
in
|
||||
{
|
||||
"/EFI/BOOT/BOOT${lib.toUpper efiArch}.EFI".source =
|
||||
@ -70,7 +70,7 @@ in
|
||||
# aarch64 kernel seems to generally be a little bigger than the
|
||||
# x86_64 kernel. To stay on the safe side, leave some more slack
|
||||
# for every platform other than x86_64.
|
||||
SizeMinBytes = if config.nixpkgs.hostPlatform.isx86_64 then "64M" else "96M";
|
||||
SizeMinBytes = if pkgs.stdenv.hostPlatform.isx86_64 then "64M" else "96M";
|
||||
};
|
||||
};
|
||||
"swap" = {
|
||||
|
||||
@ -15,12 +15,12 @@
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "vdr-softhddevice";
|
||||
version = "2.4.2";
|
||||
version = "2.4.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ua0lnj";
|
||||
repo = "vdr-plugin-softhddevice";
|
||||
sha256 = "sha256-T/A85lkKCjBaEaXGxVTurc1VY01mBCTv8t8m5qzvtpY=";
|
||||
sha256 = "sha256-KN0PJ/yER2iqk8+UZvLsgmScTa/9rmeBcZ19/ljHNAk=";
|
||||
rev = "v${version}";
|
||||
};
|
||||
|
||||
|
||||
@ -11,13 +11,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "basex";
|
||||
version = "11.6";
|
||||
version = "11.7";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://files.basex.org/releases/${version}/BaseX${
|
||||
builtins.replaceStrings [ "." ] [ "" ] version
|
||||
}.zip";
|
||||
hash = "sha256-JGf+eBBlzbg0UYQqpx/IjGhjOKWCvl5rfnYpYE+JWM4=";
|
||||
hash = "sha256-4xeMdmfk6JmfetfDGlqKQYTMtf15vRGRKYRdyrC90Cc=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Generated by ./update.sh - do not update manually!
|
||||
{
|
||||
version = "1.16.2-2";
|
||||
arm64-hash = "sha256-re+QOxuFEBmymJ4Cbsv+1UEDxWACudGoHOpha8PIAso=";
|
||||
x86_64-hash = "sha256-89I47II8g4Q7CIwxmt797SzeZlAvVu2cTh05puWZ8+8=";
|
||||
version = "1.16.2-3";
|
||||
arm64-hash = "sha256-IRzBbURF/qbPiExihycfeAQQuxO1ZG9Zy/DGr5BeCVE=";
|
||||
x86_64-hash = "sha256-Es/1Dbs0/aV8zFYFBck4y2VaNYu4+nu0bdDvyyfsk9Q=";
|
||||
}
|
||||
|
||||
76
pkgs/by-name/ca/carburetor/package.nix
Normal file
76
pkgs/by-name/ca/carburetor/package.nix
Normal file
@ -0,0 +1,76 @@
|
||||
{
|
||||
lib,
|
||||
fetchFromGitLab,
|
||||
fetchpatch2,
|
||||
python3Packages,
|
||||
appstream,
|
||||
desktop-file-utils,
|
||||
gobject-introspection,
|
||||
pkg-config,
|
||||
meson,
|
||||
wrapGAppsHook4,
|
||||
libadwaita,
|
||||
tractor,
|
||||
}:
|
||||
let
|
||||
# This package should be updated together with pkgs/by-name/tr/tractor/package.nix
|
||||
version = "5.0.0";
|
||||
in
|
||||
python3Packages.buildPythonApplication {
|
||||
|
||||
pname = "carburetor";
|
||||
inherit version;
|
||||
|
||||
pyproject = false;
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "framagit.org";
|
||||
owner = "tractor";
|
||||
repo = "carburetor";
|
||||
tag = version;
|
||||
hash = "sha256-Z67bqjogPz5sz6JwM68z1jsaqvRBAOMDeBLcyLo+QLY=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch2 {
|
||||
url = "https://framagit.org/tractor/carburetor/-/commit/620b70288942497abc20ad26c043b593f66e9e3b.diff";
|
||||
hash = "sha256-oFKLjvu+fwgyU4FIUb2K8jwXOP34P3pEazOhofwveJw=";
|
||||
})
|
||||
];
|
||||
|
||||
build-system = [
|
||||
meson
|
||||
python3Packages.meson-python
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
appstream
|
||||
desktop-file-utils
|
||||
gobject-introspection
|
||||
pkg-config
|
||||
wrapGAppsHook4
|
||||
];
|
||||
|
||||
buildInputs = [ libadwaita ];
|
||||
|
||||
dependencies = [
|
||||
python3Packages.pycountry
|
||||
python3Packages.pygobject3
|
||||
tractor
|
||||
];
|
||||
|
||||
dontWrapGApps = true;
|
||||
|
||||
preFixup = ''
|
||||
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "https://framagit.org/tractor/carburetor";
|
||||
description = "Graphical settings app for Tractor in GTK";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
platforms = lib.platforms.linux;
|
||||
mainProgram = "carburetor";
|
||||
maintainers = with lib.maintainers; [ mksafavi ];
|
||||
};
|
||||
}
|
||||
@ -1,14 +0,0 @@
|
||||
diff --git a/Clipper2.pc.cmakein b/Clipper2.pc.cmakein
|
||||
index 5632c93..0a5d6ba 100644
|
||||
--- a/Clipper2.pc.cmakein
|
||||
+++ b/Clipper2.pc.cmakein
|
||||
@@ -1,7 +1,7 @@
|
||||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
exec_prefix=${prefix}
|
||||
-libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
|
||||
-includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
|
||||
+libdir=@CMAKE_INSTALL_FULL_LIBDIR@
|
||||
+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
|
||||
|
||||
Name: Clipper2@PCFILE_LIB_SUFFIX@
|
||||
Description: A Polygon Clipping and Offsetting library in C++
|
||||
@ -7,13 +7,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "clipper2";
|
||||
version = "1.4.0";
|
||||
version = "1.5.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "AngusJohnson";
|
||||
repo = "Clipper2";
|
||||
rev = "Clipper2_${version}";
|
||||
hash = "sha256-ASL9uKkXsWyIbD1qaKEL7gf/JuCqzZQZSKHwLT5dKJU=";
|
||||
hash = "sha256-UsTOqejcN8our4UswFBvPC5fV52qJfjQYoVMEU6vDPE=";
|
||||
};
|
||||
|
||||
sourceRoot = "${src.name}/CPP";
|
||||
@ -28,10 +28,6 @@ stdenv.mkDerivation rec {
|
||||
"-DBUILD_SHARED_LIBS=ON"
|
||||
];
|
||||
|
||||
patches = [
|
||||
./0001-fix-pc-paths.patch
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Polygon Clipping and Offsetting - C++ Only";
|
||||
longDescription = ''
|
||||
|
||||
@ -11,16 +11,16 @@ let
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "clouddrive2";
|
||||
version = "0.8.6";
|
||||
version = "0.8.7";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/cloud-fs/cloud-fs.github.io/releases/download/v${finalAttrs.version}/clouddrive-2-${os}-${arch}-${finalAttrs.version}.tgz";
|
||||
hash =
|
||||
{
|
||||
x86_64-linux = "sha256-79P356HchNTpiFd7V/XeOuFyS7xpS/SARyS7X7a3Ko4=";
|
||||
aarch64-linux = "sha256-GXjr4RZCRE+oz+ldpJ4lgN5LxPD/BU1544ApNqULHTc=";
|
||||
x86_64-darwin = "sha256-otkVfPTRYmdw818RESavkZh0PRpFyrum56TnNTol538=";
|
||||
aarch64-darwin = "sha256-hePGS4CJibSTqav5Gk2/U27SO1JAeReCSDpCaijCa74=";
|
||||
x86_64-linux = "sha256-N5zZHBX0Vl4Ib3V2O4gXDQcNDibGInGDNNls226jMB0=";
|
||||
aarch64-linux = "sha256-Tk5tNJbwI8hq8ajYa2/oDWvKJaLI8E/estuWKVB17jg=";
|
||||
x86_64-darwin = "sha256-ySq8aXpCMQtU9jJFi7kJaPCRDtqZXyBRv9Zx3m3Ymms=";
|
||||
aarch64-darwin = "sha256-KMobDLbZ38tAetqP2DrHe9oClzzYpuTEyMV3oOgPVHI=";
|
||||
}
|
||||
.${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}");
|
||||
};
|
||||
|
||||
@ -7,18 +7,18 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "parca-agent";
|
||||
version = "0.35.2";
|
||||
version = "0.36.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "parca-dev";
|
||||
repo = "parca-agent";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-g+lUwo4Ng+Z103xya8CmGEoZ+vYVSpQu0CAaqafcinU=";
|
||||
hash = "sha256-06TrG4cDf5RjwScIhX4zEjcx4zlFCjnWySpZHmaXT7E=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
proxyVendor = true;
|
||||
vendorHash = "sha256-0XeotSwudDdDaQ/d+htvDK3ajBK8FRElbssz7dy3XsI=";
|
||||
vendorHash = "sha256-6PD2qd0Qeqb1yQiQcOw0nRX6lWjLsWcLDTlmbz0T5+k=";
|
||||
|
||||
buildInputs = [
|
||||
stdenv.cc.libc.static
|
||||
|
||||
@ -10,12 +10,12 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "shopware-cli";
|
||||
version = "0.4.62";
|
||||
version = "0.5.2";
|
||||
src = fetchFromGitHub {
|
||||
repo = "shopware-cli";
|
||||
owner = "FriendsOfShopware";
|
||||
tag = version;
|
||||
hash = "sha256-nFjm1z7QXuUkZ4sVRY0KdFpo0SXBTmJNA28YJpAyG2w=";
|
||||
hash = "sha256-JgoFYCcCNMPQ8+ZAq7WcLaXI4YGrscweOJ8Ju1kAHHw=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
@ -27,7 +27,7 @@ buildGoModule rec {
|
||||
dart-sass
|
||||
];
|
||||
|
||||
vendorHash = "sha256-7DVC68tKoEwaTbF6Lkv1Ib1imZojTPW3G/QS3W6N8ys=";
|
||||
vendorHash = "sha256-PCyxnrVEXlJF69EEBBBq7kbJsnEl35PZxr5kgCovY7I=";
|
||||
|
||||
postInstall = ''
|
||||
installShellCompletion --cmd shopware-cli \
|
||||
|
||||
@ -6,13 +6,13 @@
|
||||
}:
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
pname = "stevenblack-blocklist";
|
||||
version = "3.15.10";
|
||||
version = "3.15.15";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "StevenBlack";
|
||||
repo = "hosts";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-f5SH4qQzRWYKwIjpzOuhI9mPwlyNcBWjr2mrCKLgml4=";
|
||||
hash = "sha256-wycPhloUQY24wUDFWd/URRlFUiW2hi/wcohrWQ5R8E4=";
|
||||
};
|
||||
|
||||
outputs = [
|
||||
|
||||
13
pkgs/by-name/tr/tractor/fix-gsettings-schema.patch
Normal file
13
pkgs/by-name/tr/tractor/fix-gsettings-schema.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/src/tractor/db.py b/src/tractor/db.py
|
||||
index 6f39bc4..22fbdd2 100644
|
||||
--- a/src/tractor/db.py
|
||||
+++ b/src/tractor/db.py
|
||||
@@ -15,7 +15,7 @@ def dconf() -> Gio.Settings:
|
||||
"""
|
||||
schema = "org.tractor"
|
||||
schemas = Gio.SettingsSchemaSource.get_default()
|
||||
- if not Gio.SettingsSchemaSource.lookup(schemas, schema, False):
|
||||
+ if not Gio.SettingsSchemaSource.lookup(schemas, schema, recursive=True):
|
||||
gschema_dir = "/usr/share/glib-2.0/schemas/"
|
||||
for directory in GLib.get_system_data_dirs():
|
||||
gdir = f"{directory}/glib-2.0/schemas/"
|
||||
93
pkgs/by-name/tr/tractor/package.nix
Normal file
93
pkgs/by-name/tr/tractor/package.nix
Normal file
@ -0,0 +1,93 @@
|
||||
{
|
||||
lib,
|
||||
fetchFromGitLab,
|
||||
glib,
|
||||
python3Packages,
|
||||
gobject-introspection,
|
||||
gsettings-desktop-schemas,
|
||||
tor,
|
||||
obfs4,
|
||||
snowflake,
|
||||
conjure-tor,
|
||||
wrapGAppsHook4,
|
||||
withObfs4 ? true,
|
||||
withSnowflake ? true,
|
||||
withConjure ? true,
|
||||
}:
|
||||
|
||||
let
|
||||
# This package should be updated together with pkgs/by-name/ca/carburetor/package.nix
|
||||
version = "5.0.0";
|
||||
in
|
||||
python3Packages.buildPythonApplication {
|
||||
pname = "tractor";
|
||||
inherit version;
|
||||
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "framagit.org";
|
||||
owner = "tractor";
|
||||
repo = "tractor";
|
||||
tag = version;
|
||||
hash = "sha256-KyVL3dFofoi2TRtZo557X9P/RD16v94VuWdtdAskZk4=";
|
||||
};
|
||||
|
||||
patches = [ ./fix-gsettings-schema.patch ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
glib
|
||||
gobject-introspection
|
||||
gsettings-desktop-schemas
|
||||
wrapGAppsHook4
|
||||
];
|
||||
|
||||
propagatedBuildInputs =
|
||||
[
|
||||
tor
|
||||
]
|
||||
++ lib.optional withObfs4 obfs4
|
||||
++ lib.optional withSnowflake snowflake
|
||||
++ lib.optional withConjure conjure-tor;
|
||||
|
||||
dependencies = [
|
||||
python3Packages.setuptools
|
||||
python3Packages.fire
|
||||
python3Packages.pygobject3
|
||||
python3Packages.pysocks
|
||||
python3Packages.stem
|
||||
];
|
||||
|
||||
postInstall =
|
||||
''
|
||||
mkdir -p "$out/share/glib-2.0/schemas"
|
||||
cp "$src/src/tractor/tractor.gschema.xml" "$out/share/glib-2.0/schemas"
|
||||
''
|
||||
+ lib.optionalString withObfs4 ''
|
||||
substituteInPlace "$out/share/glib-2.0/schemas/tractor.gschema.xml" --replace-fail '/usr/bin/obfs4proxy' '${obfs4}/bin/lyrebird'
|
||||
''
|
||||
+ lib.optionalString withSnowflake ''
|
||||
substituteInPlace "$out/share/glib-2.0/schemas/tractor.gschema.xml" --replace-fail '/usr/bin/snowflake-client' '${snowflake}/bin/client'
|
||||
''
|
||||
+ lib.optionalString withConjure ''
|
||||
substituteInPlace "$out/share/glib-2.0/schemas/tractor.gschema.xml" --replace-fail '/usr/bin/conjure-client' '${conjure-tor}/bin/client'
|
||||
''
|
||||
+ ''
|
||||
glib-compile-schemas "$out/share/glib-2.0/schemas"
|
||||
'';
|
||||
|
||||
dontWrapGApps = true;
|
||||
|
||||
preFixup = ''
|
||||
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "https://framagit.org/tractor/tractor";
|
||||
description = "Setup a proxy with Onion Routing via TOR and optionally obfs4proxy";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
platforms = lib.platforms.linux;
|
||||
mainProgram = "tractor";
|
||||
maintainers = with lib.maintainers; [ mksafavi ];
|
||||
};
|
||||
}
|
||||
@ -8,14 +8,14 @@
|
||||
}:
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "ytdl-sub";
|
||||
version = "2025.01.17";
|
||||
version = "2025.01.28";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jmbannon";
|
||||
repo = "ytdl-sub";
|
||||
tag = version;
|
||||
hash = "sha256-6RazXOXkBXwhJz8eNhrLIoEAVXnFEAF3O+SDKSjAlYo=";
|
||||
hash = "sha256-V1qz6YNI/4bGbMOEbedTOGxmInMjzGhmk5lG9qkGNsg=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
||||
@ -0,0 +1,66 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
setuptools,
|
||||
pydantic,
|
||||
torch,
|
||||
transformers,
|
||||
nbconvert,
|
||||
nbformat,
|
||||
pytestCheckHook,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "compressed-tensors";
|
||||
version = "0.9.1";
|
||||
pyproject = true;
|
||||
|
||||
# Release on PyPI is missing the `utils` directory, which `setup.py` wants to import
|
||||
src = fetchFromGitHub {
|
||||
owner = "neuralmagic";
|
||||
repo = pname;
|
||||
tag = version;
|
||||
hash = "sha256-AsbNFBvHxjiLl0T4JnQ5QrZdERUUYgS4iJvMRQytzN4=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
dependencies = [
|
||||
pydantic
|
||||
torch
|
||||
transformers
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
pythonImportsCheck = [ "compressed_tensors" ];
|
||||
|
||||
nativeCheckInputs = [
|
||||
nbconvert
|
||||
nbformat
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
# these try to download models from HF Hub
|
||||
"test_get_observer_token_count"
|
||||
"test_kv_cache_quantization"
|
||||
"test_target_prioritization"
|
||||
"test_load_compressed_sharded"
|
||||
"test_save_compressed_model"
|
||||
"test_apply_tinyllama_dynamic_activations"
|
||||
];
|
||||
|
||||
disabledTestPaths = [
|
||||
# these try to download models from HF Hub
|
||||
"tests/test_quantization/lifecycle/test_apply.py"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A safetensors extension to efficiently store sparse quantized tensors on disk";
|
||||
homepage = "https://github.com/neuralmagic/compressed-tensors";
|
||||
license = licenses.asl20;
|
||||
maintainers = [ ];
|
||||
};
|
||||
}
|
||||
57
pkgs/development/python-modules/mistral-common/default.nix
Normal file
57
pkgs/development/python-modules/mistral-common/default.nix
Normal file
@ -0,0 +1,57 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
poetry-core,
|
||||
numpy,
|
||||
pydantic,
|
||||
jsonschema,
|
||||
sentencepiece,
|
||||
typing-extensions,
|
||||
tiktoken,
|
||||
pillow,
|
||||
requests,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "mistral-common";
|
||||
version = "1.5.2";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
pname = "mistral_common";
|
||||
inherit version;
|
||||
hash = "sha256-nRFXsTdsSdNav8dD2+AITyyjezpavQPnQSdqG8ZshS8=";
|
||||
};
|
||||
|
||||
# relax dependencies
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace-fail 'pillow = "^10.3.0"' 'pillow = ">=10.3.0"' \
|
||||
--replace-fail 'tiktoken = "^0.7.0"' 'tiktoken = ">=0.7.0"' \
|
||||
'';
|
||||
|
||||
build-system = [ poetry-core ];
|
||||
|
||||
dependencies = [
|
||||
numpy
|
||||
pydantic
|
||||
jsonschema
|
||||
sentencepiece
|
||||
typing-extensions
|
||||
tiktoken
|
||||
pillow
|
||||
requests
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
pythonImportsCheck = [ "mistral_common" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "mistral-common is a set of tools to help you work with Mistral models.";
|
||||
homepage = "https://github.com/mistralai/mistral-common";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ bgamari ];
|
||||
};
|
||||
}
|
||||
@ -0,0 +1,42 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
pdm-backend,
|
||||
tqdm,
|
||||
hypothesis,
|
||||
pytest,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "partial-json-parser";
|
||||
version = "0.2.1.1.post5";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
pname = "partial_json_parser";
|
||||
inherit version;
|
||||
hash = "sha256-mScQrGfpCzZ5IdUnJ2mJKAQPdxO6fsszuWNx6nrsgso=";
|
||||
};
|
||||
|
||||
build-system = [ pdm-backend ];
|
||||
|
||||
dependencies = [ ];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
pythonImportsCheck = [ "partial_json_parser" ];
|
||||
|
||||
dev-dependencies = [
|
||||
hypothesis
|
||||
tqdm
|
||||
pytest
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Parse partial JSON generated by LLM";
|
||||
homepage = "https://github.com/promplate/partial-json-parser";
|
||||
license = licenses.mit;
|
||||
maintainers = [ ];
|
||||
};
|
||||
}
|
||||
@ -30,13 +30,13 @@ let
|
||||
in
|
||||
buildGoModule rec {
|
||||
pname = "minio";
|
||||
version = "2025-01-18T00-31-37Z";
|
||||
version = "2025-01-20T14-49-07Z";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "minio";
|
||||
repo = "minio";
|
||||
rev = "RELEASE.${version}";
|
||||
hash = "sha256-ppw8daJk5cS3fkKlIk6CQudOICHUp/M4LvDhJKKdg2Y=";
|
||||
hash = "sha256-0lYRMNPnXVncTrYP87T76eV4wkgH/ODNL6pvhs17pr4=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-zb/A7vOsZIMLkGVmgVbrCt/lY2K8v7ofTgSA0Z3dvXA=";
|
||||
|
||||
@ -84,7 +84,9 @@ let
|
||||
));
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
buildInputs = [ postgresql ] ++ prevAttrs.buildInputs or [ ];
|
||||
nativeBuildInputs = [ postgresql ] ++ prevAttrs.nativeBuildInputs or [ ];
|
||||
|
||||
installFlags = [
|
||||
"DESTDIR=${placeholder "out"}"
|
||||
|
||||
@ -15,9 +15,7 @@ buildPostgresqlExtension (finalAttrs: {
|
||||
|
||||
inherit (pg-dump-anon) version src;
|
||||
|
||||
nativeBuildInputs = [ postgresql ] ++ lib.optional jitSupport llvm;
|
||||
|
||||
strictDeps = true;
|
||||
nativeBuildInputs = lib.optional jitSupport llvm;
|
||||
|
||||
# Needs to be after postInstall, where removeNestedNixStore runs
|
||||
preFixup = ''
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
postgresql,
|
||||
boost,
|
||||
boost186,
|
||||
postgresqlTestExtension,
|
||||
buildPostgresqlExtension,
|
||||
}:
|
||||
@ -39,7 +39,8 @@ buildPostgresqlExtension (finalAttrs: {
|
||||
|
||||
sourceRoot = main_src.name;
|
||||
|
||||
buildInputs = [ boost ];
|
||||
# fails to build with boost 1.87
|
||||
buildInputs = [ boost186 ];
|
||||
|
||||
patchPhase = ''
|
||||
runHook prePatch
|
||||
|
||||
@ -11,6 +11,7 @@ buildPostgresqlExtension rec {
|
||||
pname = "cstore_fdw";
|
||||
version = "1.7.0-unstable-2021-03-08";
|
||||
|
||||
buildInputs = [ protobufc ];
|
||||
nativeBuildInputs = [ protobufc ];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
|
||||
@ -23,12 +23,9 @@ buildPostgresqlExtension (finalAttrs: {
|
||||
hash = "sha256-Sa9ltW3KV/69OCxD3gRcp5owL0oW+z3fs4fRBHbSh30=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
postgresql
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
buildPostgresqlExtension rec {
|
||||
pname = "pg_ed25519";
|
||||
version = "0.2";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "dwagin";
|
||||
repo = "pg_ed25519";
|
||||
@ -22,7 +23,7 @@ buildPostgresqlExtension rec {
|
||||
maintainers = [ maintainers.renzo ];
|
||||
platforms = postgresql.meta.platforms;
|
||||
license = licenses.mit;
|
||||
# Broken on darwin and linux (JIT) with no upstream fix available.
|
||||
broken = lib.versionAtLeast postgresql.version "16" && stdenv.cc.isClang;
|
||||
# Broken with no upstream fix available.
|
||||
broken = lib.versionAtLeast postgresql.version "16";
|
||||
};
|
||||
}
|
||||
|
||||
@ -19,6 +19,7 @@ buildPostgresqlExtension rec {
|
||||
};
|
||||
|
||||
buildInputs = [ curl ];
|
||||
nativeBuildInputs = [ curl ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "HTTP client for PostgreSQL, retrieve a web page from inside the database";
|
||||
|
||||
@ -22,7 +22,6 @@ buildPostgresqlExtension (finalAttrs: {
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
postgresql
|
||||
perl
|
||||
perlPackages.TAPParserSourceHandlerpgTAP
|
||||
which
|
||||
|
||||
@ -51,7 +51,6 @@ buildPostgresqlExtension (finalAttrs: {
|
||||
|
||||
buildInputs =
|
||||
[
|
||||
libxml2
|
||||
geos
|
||||
proj
|
||||
gdal
|
||||
@ -65,8 +64,10 @@ buildPostgresqlExtension (finalAttrs: {
|
||||
autoconf
|
||||
automake
|
||||
libtool
|
||||
libxml2
|
||||
perl
|
||||
pkg-config
|
||||
protobufc
|
||||
which
|
||||
] ++ lib.optional jitSupport llvm;
|
||||
dontDisableStatic = true;
|
||||
|
||||
@ -24,7 +24,7 @@ buildPostgresqlExtension rec {
|
||||
platforms = postgresql.meta.platforms;
|
||||
license = licenses.bsd2;
|
||||
maintainers = [ ];
|
||||
# Broken on darwin and linux (JIT) with no upstream fix available.
|
||||
broken = lib.versionAtLeast postgresql.version "16" && stdenv.cc.isClang;
|
||||
# Broken with no upstream fix available.
|
||||
broken = lib.versionAtLeast postgresql.version "16";
|
||||
};
|
||||
}
|
||||
|
||||
128
pkgs/test/top-level/stage.nix
Normal file
128
pkgs/test/top-level/stage.nix
Normal file
@ -0,0 +1,128 @@
|
||||
# run like this:
|
||||
# nix-build pkgs/test/top-level/stage.nix
|
||||
{
|
||||
localSystem ? {
|
||||
system = builtins.currentSystem;
|
||||
},
|
||||
}:
|
||||
|
||||
with import ../../top-level { inherit localSystem; };
|
||||
|
||||
let
|
||||
# To silence platform specific evaluation errors
|
||||
discardEvaluationErrors = e: (builtins.tryEval e).success -> e;
|
||||
|
||||
# Basic test for idempotency of the package set, i.e:
|
||||
# Applying the same package set twice should work and
|
||||
# not change anything.
|
||||
isIdempotent = set: discardEvaluationErrors (pkgs.${set}.stdenv == pkgs.${set}.${set}.stdenv);
|
||||
|
||||
# Some package sets should be noops in certain circumstances.
|
||||
# This is very similar to the idempotency test, but not going
|
||||
# via the super' overlay.
|
||||
isNoop =
|
||||
parent: child:
|
||||
discardEvaluationErrors (
|
||||
(lib.getAttrFromPath parent pkgs).stdenv == (lib.getAttrFromPath parent pkgs).${child}.stdenv
|
||||
);
|
||||
|
||||
allMuslExamples = builtins.attrNames (
|
||||
lib.filterAttrs (_: system: lib.hasSuffix "-musl" system.config) lib.systems.examples
|
||||
);
|
||||
|
||||
allLLVMExamples = builtins.attrNames (
|
||||
lib.filterAttrs (_: system: system.useLLVM or false) lib.systems.examples
|
||||
);
|
||||
|
||||
# A package set should only change specific configuration, but needs
|
||||
# to keep all other configuration from previous layers in place.
|
||||
# Each package set has one or more key characteristics for which we
|
||||
# test here. Those should be kept, even when applying the "set" package
|
||||
# set.
|
||||
isComposable =
|
||||
set:
|
||||
(
|
||||
# Can't compose two different libcs...
|
||||
builtins.elem set [ "pkgsLLVMLibc" ]
|
||||
|| discardEvaluationErrors (
|
||||
pkgsCross.mingwW64.${set}.stdenv.hostPlatform.config == "x86_64-w64-mingw32"
|
||||
)
|
||||
)
|
||||
&& (
|
||||
# Can't compose two different libcs...
|
||||
builtins.elem set [ "pkgsLLVMLibc" ]
|
||||
|| discardEvaluationErrors (pkgsCross.mingwW64.${set}.stdenv.hostPlatform.libc == "msvcrt")
|
||||
)
|
||||
&& discardEvaluationErrors (pkgsCross.ppc64-musl.${set}.stdenv.hostPlatform.gcc.abi == "elfv2")
|
||||
&& discardEvaluationErrors (
|
||||
builtins.elem "trivialautovarinit" pkgs.pkgsExtraHardening.${set}.stdenv.cc.defaultHardeningFlags
|
||||
)
|
||||
&& discardEvaluationErrors (pkgs.pkgsLLVM.${set}.stdenv.hostPlatform.useLLVM)
|
||||
&& (
|
||||
# Can't compose two different libcs...
|
||||
builtins.elem set [
|
||||
"pkgsMusl"
|
||||
"pkgsStatic"
|
||||
]
|
||||
|| discardEvaluationErrors (pkgs.pkgsLLVMLibc.${set}.stdenv.hostPlatform.isLLVMLibc)
|
||||
)
|
||||
&& discardEvaluationErrors (pkgs.pkgsArocc.${set}.stdenv.hostPlatform.useArocc)
|
||||
&& discardEvaluationErrors (pkgs.pkgsZig.${set}.stdenv.hostPlatform.useZig)
|
||||
&& discardEvaluationErrors (pkgs.pkgsLinux.${set}.stdenv.buildPlatform.isLinux)
|
||||
&& (
|
||||
# Can't compose two different libcs...
|
||||
builtins.elem set [ "pkgsLLVMLibc" ]
|
||||
|| discardEvaluationErrors (pkgs.pkgsMusl.${set}.stdenv.hostPlatform.isMusl)
|
||||
)
|
||||
&& discardEvaluationErrors (pkgs.pkgsStatic.${set}.stdenv.hostPlatform.isStatic)
|
||||
&& discardEvaluationErrors (pkgs.pkgsi686Linux.${set}.stdenv.hostPlatform.isx86_32)
|
||||
&& discardEvaluationErrors (pkgs.pkgsx86_64Darwin.${set}.stdenv.hostPlatform.isx86_64);
|
||||
in
|
||||
|
||||
# Appends same defaultHardeningFlags again on each .pkgsExtraHardening - thus not idempotent.
|
||||
# assert isIdempotent "pkgsExtraHardening";
|
||||
# TODO: Remove the isDarwin condition, which currently results in infinite recursion.
|
||||
# Also see https://github.com/NixOS/nixpkgs/pull/330567#discussion_r1894653309
|
||||
assert (stdenv.hostPlatform.isDarwin || isIdempotent "pkgsLLVM");
|
||||
# TODO: This currently results in infinite recursion, even on Linux
|
||||
# assert isIdempotent "pkgsLLVMLibc";
|
||||
assert isIdempotent "pkgsArocc";
|
||||
assert isIdempotent "pkgsZig";
|
||||
assert isIdempotent "pkgsLinux";
|
||||
assert isIdempotent "pkgsMusl";
|
||||
assert isIdempotent "pkgsStatic";
|
||||
assert isIdempotent "pkgsi686Linux";
|
||||
assert isIdempotent "pkgsx86_64Darwin";
|
||||
|
||||
assert isNoop [ "pkgsStatic" ] "pkgsMusl";
|
||||
assert lib.all (sys: isNoop [ "pkgsCross" sys ] "pkgsMusl") allMuslExamples;
|
||||
assert lib.all (sys: isNoop [ "pkgsCross" sys ] "pkgsLLVM") allLLVMExamples;
|
||||
|
||||
assert isComposable "pkgsExtraHardening";
|
||||
assert isComposable "pkgsLLVM";
|
||||
# TODO: Results in infinite recursion
|
||||
# assert isComposable "pkgsLLVMLibc";
|
||||
assert isComposable "pkgsArocc";
|
||||
# TODO: unexpected argument 'bintools' - uncomment once https://github.com/NixOS/nixpkgs/pull/331011 is done
|
||||
# assert isComposable "pkgsZig";
|
||||
assert isComposable "pkgsMusl";
|
||||
assert isComposable "pkgsStatic";
|
||||
assert isComposable "pkgsi686Linux";
|
||||
|
||||
# Special cases regarding buildPlatform vs hostPlatform
|
||||
assert discardEvaluationErrors (pkgsCross.gnu64.pkgsMusl.stdenv.hostPlatform.isMusl);
|
||||
assert discardEvaluationErrors (pkgsCross.gnu64.pkgsi686Linux.stdenv.hostPlatform.isx86_32);
|
||||
assert discardEvaluationErrors (pkgsCross.mingwW64.pkgsLinux.stdenv.hostPlatform.isLinux);
|
||||
assert discardEvaluationErrors (
|
||||
pkgsCross.aarch64-darwin.pkgsx86_64Darwin.stdenv.hostPlatform.isx86_64
|
||||
);
|
||||
|
||||
# pkgsCross should keep upper cross settings
|
||||
assert discardEvaluationErrors (
|
||||
with pkgsStatic.pkgsCross.gnu64.stdenv.hostPlatform; isGnu && isStatic
|
||||
);
|
||||
assert discardEvaluationErrors (
|
||||
with pkgsLLVM.pkgsCross.musl64.stdenv.hostPlatform; isMusl && useLLVM
|
||||
);
|
||||
|
||||
emptyFile
|
||||
@ -1667,9 +1667,9 @@ with pkgs;
|
||||
# pkgsCross.aarch64-multiplatform.freshBootstrapTools.build
|
||||
freshBootstrapTools = if stdenv.hostPlatform.isDarwin then
|
||||
callPackage ../stdenv/darwin/make-bootstrap-tools.nix {
|
||||
localSystem = stdenv.buildPlatform;
|
||||
localSystem = { config = lib.systems.parse.tripleFromSystem stdenv.buildPlatform; };
|
||||
crossSystem =
|
||||
if stdenv.buildPlatform == stdenv.hostPlatform then null else stdenv.hostPlatform;
|
||||
if stdenv.buildPlatform == stdenv.hostPlatform then null else { config = lib.systems.parse.tripleFromSystem stdenv.hostPlatform; };
|
||||
}
|
||||
else if stdenv.hostPlatform.isLinux then
|
||||
callPackage ../stdenv/linux/make-bootstrap-tools.nix {}
|
||||
@ -17729,7 +17729,7 @@ with pkgs;
|
||||
[(
|
||||
{ lib, ... }: {
|
||||
config.nixpkgs.pkgs = lib.mkDefault pkgs;
|
||||
config.nixpkgs.localSystem = lib.mkDefault stdenv.hostPlatform;
|
||||
config.nixpkgs.localSystem = lib.mkDefault ({ config = lib.systems.parse.tripleFromSystem stdenv.hostPlatform; });
|
||||
}
|
||||
)] ++ (
|
||||
if builtins.isList configuration
|
||||
|
||||
@ -46,6 +46,11 @@
|
||||
...
|
||||
} @ args:
|
||||
|
||||
# Passing fully elaborated systems to localSystem or crossSystem will break composability
|
||||
# of package sets.
|
||||
assert builtins.isAttrs localSystem -> !(localSystem ? parsed);
|
||||
assert builtins.isAttrs crossSystem -> !(crossSystem ? parsed);
|
||||
|
||||
let # Rename the function arguments
|
||||
config0 = config;
|
||||
crossSystem0 = crossSystem;
|
||||
@ -122,22 +127,18 @@ in let
|
||||
config = lib.showWarnings configEval.config.warnings configEval.config;
|
||||
|
||||
# A few packages make a new package set to draw their dependencies from.
|
||||
# (Currently to get a cross tool chain, or forced-i686 package.) Rather than
|
||||
# give `all-packages.nix` all the arguments to this function, even ones that
|
||||
# don't concern it, we give it this function to "re-call" nixpkgs, inheriting
|
||||
# whatever arguments it doesn't explicitly provide. This way,
|
||||
# `all-packages.nix` doesn't know more than it needs too.
|
||||
# Rather than give `all-packages.nix` all the arguments to this function,
|
||||
# even ones that don't concern it, we give it this function to "re-call"
|
||||
# nixpkgs, inheriting whatever arguments it doesn't explicitly provide. This
|
||||
# way, `all-packages.nix` doesn't know more than it needs to.
|
||||
#
|
||||
# It's OK that `args` doesn't include default arguments from this file:
|
||||
# they'll be deterministically inferred. In fact we must *not* include them,
|
||||
# because it's important that if some parameter which affects the default is
|
||||
# substituted with a different argument, the default is re-inferred.
|
||||
#
|
||||
# To put this in concrete terms, this function is basically just used today to
|
||||
# use package for a different platform for the current platform (namely cross
|
||||
# compiling toolchains and 32-bit packages on x86_64). In both those cases we
|
||||
# want the provided non-native `localSystem` argument to affect the stdenv
|
||||
# chosen.
|
||||
# To put this in concrete terms, we want the provided non-native `localSystem`
|
||||
# and `crossSystem` arguments to affect the stdenv chosen.
|
||||
#
|
||||
# NB!!! This thing gets its `config` argument from `args`, i.e. it's actually
|
||||
# `config0`. It is important to keep it to `config0` format (as opposed to the
|
||||
@ -146,7 +147,7 @@ in let
|
||||
# via `evalModules` is not idempotent. In other words, if you add `config` to
|
||||
# `newArgs`, expect strange very hard to debug errors! (Yes, I'm speaking from
|
||||
# experience here.)
|
||||
nixpkgsFun = newArgs: import ./. (args // newArgs);
|
||||
nixpkgsFun = f0: import ./. (args // f0 args);
|
||||
|
||||
# Partially apply some arguments for building bootstraping stage pkgs
|
||||
# sets. Only apply arguments which no stdenv would want to override.
|
||||
|
||||
@ -2592,6 +2592,8 @@ self: super: with self; {
|
||||
|
||||
compressed-rtf = callPackage ../development/python-modules/compressed-rtf { };
|
||||
|
||||
compressed-tensors = callPackage ../development/python-modules/compressed-tensors { };
|
||||
|
||||
concurrent-log-handler = callPackage ../development/python-modules/concurrent-log-handler { };
|
||||
|
||||
conda = callPackage ../development/python-modules/conda { };
|
||||
@ -8292,6 +8294,8 @@ self: super: with self; {
|
||||
|
||||
mistletoe = callPackage ../development/python-modules/mistletoe { };
|
||||
|
||||
mistral-common = callPackage ../development/python-modules/mistral-common { };
|
||||
|
||||
mistune = callPackage ../development/python-modules/mistune { };
|
||||
|
||||
mitmproxy = callPackage ../development/python-modules/mitmproxy { };
|
||||
@ -10106,6 +10110,8 @@ self: super: with self; {
|
||||
|
||||
partd = callPackage ../development/python-modules/partd { };
|
||||
|
||||
partial-json-parser = callPackage ../development/python-modules/partial-json-parser { };
|
||||
|
||||
parts = callPackage ../development/python-modules/parts { };
|
||||
|
||||
particle = callPackage ../development/python-modules/particle { };
|
||||
|
||||
@ -180,168 +180,111 @@ let
|
||||
((config.packageOverrides or (super: {})) super);
|
||||
|
||||
# Convenience attributes for instantitating package sets. Each of
|
||||
# these will instantiate a new version of allPackages. Currently the
|
||||
# following package sets are provided:
|
||||
#
|
||||
# - pkgsCross.<system> where system is a member of lib.systems.examples
|
||||
# - pkgsMusl
|
||||
# - pkgsi686Linux
|
||||
otherPackageSets = self: super: {
|
||||
# these will instantiate a new version of allPackages.
|
||||
otherPackageSets = let
|
||||
mkPkgs = name: fn: nixpkgsFun (prevArgs: let nixpkgsArgs = fn prevArgs; in nixpkgsArgs // {
|
||||
overlays = [
|
||||
(self': super': {
|
||||
"${name}" = super';
|
||||
})
|
||||
] ++ nixpkgsArgs.overlays or [] ++ prevArgs.overlays or [];
|
||||
});
|
||||
# This is always cross.
|
||||
mkCrossPkgs = name: crossAttrs: mkPkgs name (prevArgs: {
|
||||
crossSystem =
|
||||
(lib.systems.systemToAttrs (lib.defaultTo prevArgs.localSystem prevArgs.crossSystem or null)) // crossAttrs;
|
||||
});
|
||||
# This is only cross when we are already cross, otherwise local.
|
||||
# For the case of "native cross", i.e. pkgsCross.gnu64 on a x86_64-linux system, we need to adjust **both**
|
||||
# localSystem **and** crossSystem, otherwise they're out of sync.
|
||||
mkHybridPkgs = name: hybridAttrs: mkPkgs name (prevArgs: let
|
||||
newSystem = (lib.systems.systemToAttrs (lib.defaultTo prevArgs.localSystem prevArgs.crossSystem or null)) // hybridAttrs;
|
||||
in { crossSystem = newSystem; }
|
||||
// lib.optionalAttrs (stdenv.hostPlatform == stdenv.buildPlatform) { localSystem = newSystem; }
|
||||
);
|
||||
in self: super: {
|
||||
# This maps each entry in lib.systems.examples to its own package
|
||||
# set. Each of these will contain all packages cross compiled for
|
||||
# that target system. For instance, pkgsCross.raspberryPi.hello,
|
||||
# will refer to the "hello" package built for the ARM6-based
|
||||
# Raspberry Pi.
|
||||
pkgsCross = lib.mapAttrs (n: crossSystem:
|
||||
nixpkgsFun { inherit crossSystem; })
|
||||
nixpkgsFun (prevArgs: { crossSystem = (lib.systems.systemToAttrs (lib.defaultTo { } prevArgs.crossSystem or null)) // crossSystem; }))
|
||||
lib.systems.examples;
|
||||
|
||||
pkgsLLVM = nixpkgsFun {
|
||||
overlays = [
|
||||
(self': super': {
|
||||
pkgsLLVM = super';
|
||||
})
|
||||
] ++ overlays;
|
||||
# Bootstrap a cross stdenv using the LLVM toolchain.
|
||||
# This is currently not possible when compiling natively,
|
||||
# so we don't need to check hostPlatform != buildPlatform.
|
||||
crossSystem = stdenv.hostPlatform // {
|
||||
useLLVM = true;
|
||||
linker = "lld";
|
||||
};
|
||||
# Bootstrap a cross stdenv using the LLVM toolchain.
|
||||
# This is currently not possible when compiling natively.
|
||||
pkgsLLVM = mkCrossPkgs "pkgsLLVM" {
|
||||
useLLVM = true;
|
||||
linker = "lld";
|
||||
};
|
||||
|
||||
pkgsLLVMLibc = nixpkgsFun {
|
||||
overlays = [ (self': super': {
|
||||
pkgsLLVMLibc = super';
|
||||
})] ++ overlays;
|
||||
# Bootstrap a cross stdenv using LLVM libc.
|
||||
# This is currently not possible when compiling natively,
|
||||
# so we don't need to check hostPlatform != buildPlatform.
|
||||
crossSystem = stdenv.hostPlatform // {
|
||||
config = lib.systems.parse.tripleFromSystem (makeLLVMParsedPlatform stdenv.hostPlatform.parsed);
|
||||
libc = "llvm";
|
||||
};
|
||||
# Bootstrap a cross stdenv using LLVM libc.
|
||||
# This is currently not possible when compiling natively.
|
||||
pkgsLLVMLibc = mkCrossPkgs "pkgsLLVMLibc" {
|
||||
config = lib.systems.parse.tripleFromSystem (makeLLVMParsedPlatform stdenv.hostPlatform.parsed);
|
||||
libc = "llvm";
|
||||
};
|
||||
|
||||
pkgsArocc = nixpkgsFun {
|
||||
overlays = [
|
||||
(self': super': {
|
||||
pkgsArocc = super';
|
||||
})
|
||||
] ++ overlays;
|
||||
# Bootstrap a cross stdenv using the Aro C compiler.
|
||||
# This is currently not possible when compiling natively,
|
||||
# so we don't need to check hostPlatform != buildPlatform.
|
||||
crossSystem = stdenv.hostPlatform // {
|
||||
useArocc = true;
|
||||
linker = "lld";
|
||||
};
|
||||
# Bootstrap a cross stdenv using the Aro C compiler.
|
||||
# This is currently not possible when compiling natively.
|
||||
pkgsArocc = mkCrossPkgs "pkgsArocc" {
|
||||
useArocc = true;
|
||||
linker = "lld";
|
||||
};
|
||||
|
||||
pkgsZig = nixpkgsFun {
|
||||
overlays = [
|
||||
(self': super': {
|
||||
pkgsZig = super';
|
||||
})
|
||||
] ++ overlays;
|
||||
# Bootstrap a cross stdenv using the Zig toolchain.
|
||||
# This is currently not possible when compiling natively,
|
||||
# so we don't need to check hostPlatform != buildPlatform.
|
||||
crossSystem = stdenv.hostPlatform // {
|
||||
useZig = true;
|
||||
linker = "lld";
|
||||
};
|
||||
# Bootstrap a cross stdenv using the Zig toolchain.
|
||||
# This is currently not possible when compiling natively.
|
||||
pkgsZig = mkCrossPkgs "pkgsZig" {
|
||||
useZig = true;
|
||||
linker = "lld";
|
||||
};
|
||||
|
||||
# All packages built with the Musl libc. This will override the
|
||||
# default GNU libc on Linux systems. Non-Linux systems are not
|
||||
# supported. 32-bit is also not supported.
|
||||
pkgsMusl = if stdenv.hostPlatform.isLinux && stdenv.buildPlatform.is64bit then nixpkgsFun {
|
||||
overlays = [ (self': super': {
|
||||
pkgsMusl = super';
|
||||
})] ++ overlays;
|
||||
${if stdenv.hostPlatform == stdenv.buildPlatform
|
||||
then "localSystem" else "crossSystem"} = {
|
||||
config = lib.systems.parse.tripleFromSystem (makeMuslParsedPlatform stdenv.hostPlatform.parsed);
|
||||
};
|
||||
pkgsMusl = if stdenv.hostPlatform.isLinux && stdenv.buildPlatform.is64bit then mkHybridPkgs "pkgsMusl" {
|
||||
config = lib.systems.parse.tripleFromSystem (makeMuslParsedPlatform stdenv.hostPlatform.parsed);
|
||||
} else throw "Musl libc only supports 64-bit Linux systems.";
|
||||
|
||||
# All packages built for i686 Linux.
|
||||
# Used by wine, firefox with debugging version of Flash, ...
|
||||
pkgsi686Linux = if stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isx86 then nixpkgsFun {
|
||||
overlays = [ (self': super': {
|
||||
pkgsi686Linux = super';
|
||||
})] ++ overlays;
|
||||
${if stdenv.hostPlatform == stdenv.buildPlatform
|
||||
then "localSystem" else "crossSystem"} = {
|
||||
config = lib.systems.parse.tripleFromSystem (stdenv.hostPlatform.parsed // {
|
||||
cpu = lib.systems.parse.cpuTypes.i686;
|
||||
});
|
||||
};
|
||||
pkgsi686Linux = if stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isx86 then mkHybridPkgs "pkgsi686Linux" {
|
||||
config = lib.systems.parse.tripleFromSystem (stdenv.hostPlatform.parsed // {
|
||||
cpu = lib.systems.parse.cpuTypes.i686;
|
||||
});
|
||||
} else throw "i686 Linux package set can only be used with the x86 family.";
|
||||
|
||||
# x86_64-darwin packages for aarch64-darwin users to use with Rosetta for incompatible packages
|
||||
pkgsx86_64Darwin = if stdenv.hostPlatform.isDarwin then nixpkgsFun {
|
||||
overlays = [ (self': super': {
|
||||
pkgsx86_64Darwin = super';
|
||||
})] ++ overlays;
|
||||
localSystem = {
|
||||
config = lib.systems.parse.tripleFromSystem (stdenv.hostPlatform.parsed // {
|
||||
cpu = lib.systems.parse.cpuTypes.x86_64;
|
||||
});
|
||||
};
|
||||
pkgsx86_64Darwin = if stdenv.hostPlatform.isDarwin then mkHybridPkgs "pkgsx86_64Darwin" {
|
||||
config = lib.systems.parse.tripleFromSystem (stdenv.hostPlatform.parsed // {
|
||||
cpu = lib.systems.parse.cpuTypes.x86_64;
|
||||
});
|
||||
} else throw "x86_64 Darwin package set can only be used on Darwin systems.";
|
||||
|
||||
# If already linux: the same package set unaltered
|
||||
# Otherwise, return a natively built linux package set for the current cpu architecture string.
|
||||
# Otherwise, return a linux package set for the current cpu architecture string.
|
||||
# (ABI and other details will be set to the default for the cpu/os pair)
|
||||
pkgsLinux =
|
||||
if stdenv.hostPlatform.isLinux
|
||||
then self
|
||||
else nixpkgsFun {
|
||||
localSystem = lib.systems.elaborate "${stdenv.hostPlatform.parsed.cpu.name}-linux";
|
||||
else mkHybridPkgs "pkgsLinux" {
|
||||
config = lib.systems.parse.tripleFromSystem (lib.systems.elaborate "${stdenv.hostPlatform.parsed.cpu.name}-linux").parsed;
|
||||
};
|
||||
|
||||
# Extend the package set with zero or more overlays. This preserves
|
||||
# preexisting overlays. Prefer to initialize with the right overlays
|
||||
# in one go when calling Nixpkgs, for performance and simplicity.
|
||||
appendOverlays = extraOverlays:
|
||||
if extraOverlays == []
|
||||
then self
|
||||
else nixpkgsFun { overlays = args.overlays ++ extraOverlays; };
|
||||
|
||||
# NOTE: each call to extend causes a full nixpkgs rebuild, adding ~130MB
|
||||
# of allocations. DO NOT USE THIS IN NIXPKGS.
|
||||
#
|
||||
# Extend the package set with a single overlay. This preserves
|
||||
# preexisting overlays. Prefer to initialize with the right overlays
|
||||
# in one go when calling Nixpkgs, for performance and simplicity.
|
||||
# Prefer appendOverlays if used repeatedly.
|
||||
extend = f: self.appendOverlays [f];
|
||||
|
||||
# Fully static packages.
|
||||
# Currently uses Musl on Linux (couldn’t get static glibc to work).
|
||||
pkgsStatic = nixpkgsFun ({
|
||||
overlays = [ (self': super': {
|
||||
pkgsStatic = super';
|
||||
})] ++ overlays;
|
||||
crossSystem = {
|
||||
isStatic = true;
|
||||
config = lib.systems.parse.tripleFromSystem (
|
||||
if stdenv.hostPlatform.isLinux
|
||||
then makeMuslParsedPlatform stdenv.hostPlatform.parsed
|
||||
else stdenv.hostPlatform.parsed
|
||||
);
|
||||
gcc = lib.optionalAttrs (stdenv.hostPlatform.system == "powerpc64-linux") { abi = "elfv2"; } //
|
||||
stdenv.hostPlatform.gcc or {};
|
||||
};
|
||||
pkgsStatic = mkCrossPkgs "pkgsStatic" ({
|
||||
isStatic = true;
|
||||
} // lib.optionalAttrs stdenv.hostPlatform.isLinux {
|
||||
config = lib.systems.parse.tripleFromSystem (makeMuslParsedPlatform stdenv.hostPlatform.parsed);
|
||||
} // lib.optionalAttrs (stdenv.hostPlatform.system == "powerpc64-linux") {
|
||||
gcc = { abi = "elfv2"; } // stdenv.hostPlatform.gcc or {};
|
||||
});
|
||||
|
||||
pkgsExtraHardening = nixpkgsFun {
|
||||
pkgsExtraHardening = mkPkgs "pkgsExtraHardening" (_: {
|
||||
overlays = [
|
||||
(self': super': {
|
||||
pkgsExtraHardening = super';
|
||||
stdenv = super'.withDefaultHardeningFlags (
|
||||
super'.stdenv.cc.defaultHardeningFlags ++ [
|
||||
"shadowstack"
|
||||
@ -360,8 +303,25 @@ let
|
||||
pcre-cpp = super'.pcre-cpp.override { enableJit = false; };
|
||||
pcre16 = super'.pcre16.override { enableJit = false; };
|
||||
})
|
||||
] ++ overlays;
|
||||
};
|
||||
];
|
||||
});
|
||||
|
||||
# Extend the package set with zero or more overlays. This preserves
|
||||
# preexisting overlays. Prefer to initialize with the right overlays
|
||||
# in one go when calling Nixpkgs, for performance and simplicity.
|
||||
appendOverlays = extraOverlays:
|
||||
if extraOverlays == []
|
||||
then self
|
||||
else nixpkgsFun (prevArgs: { overlays = prevArgs.overlays ++ extraOverlays; });
|
||||
|
||||
# NOTE: each call to extend causes a full nixpkgs rebuild, adding ~130MB
|
||||
# of allocations. DO NOT USE THIS IN NIXPKGS.
|
||||
#
|
||||
# Extend the package set with a single overlay. This preserves
|
||||
# preexisting overlays. Prefer to initialize with the right overlays
|
||||
# in one go when calling Nixpkgs, for performance and simplicity.
|
||||
# Prefer appendOverlays if used repeatedly.
|
||||
extend = f: self.appendOverlays [f];
|
||||
};
|
||||
|
||||
# The complete chain of package set builders, applied from top to bottom.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user