lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge remote-tracking branch 'origin/master' into staging-next

K900 56c60b2c a0478f49

+343 -403
+20 -20
nixos/modules/misc/nixpkgs.nix
··· 73 73 defaultPkgs = 74 74 if opt.hostPlatform.isDefined then 75 75 let 76 - isCross = 77 - !(lib.systems.equals (lib.systems.elaborate cfg.buildPlatform) ( 78 - lib.systems.elaborate cfg.hostPlatform 79 - )); 76 + isCross = cfg.buildPlatform != cfg.hostPlatform; 80 77 systemArgs = 81 78 if isCross then 82 79 { ··· 198 195 }; 199 196 200 197 hostPlatform = lib.mkOption { 201 - type = lib.types.either lib.types.str lib.types.attrs; 198 + type = lib.types.either lib.types.str lib.types.attrs; # TODO utilize lib.systems.parsedPlatform 202 199 example = { 203 200 system = "aarch64-linux"; 204 201 }; 202 + # Make sure that the final value has all fields for sake of other modules 203 + # referring to this. TODO make `lib.systems` itself use the module system. 204 + apply = lib.systems.elaborate; 205 205 defaultText = lib.literalExpression ''(import "''${nixos}/../lib").lib.systems.examples.aarch64-multiplatform''; 206 206 description = '' 207 207 Specifies the platform where the NixOS configuration will run. ··· 213 213 }; 214 214 215 215 buildPlatform = lib.mkOption { 216 - type = lib.types.either lib.types.str lib.types.attrs; 216 + type = lib.types.either lib.types.str lib.types.attrs; # TODO utilize lib.systems.parsedPlatform 217 217 default = cfg.hostPlatform; 218 218 example = { 219 219 system = "x86_64-linux"; 220 220 }; 221 221 # Make sure that the final value has all fields for sake of other modules 222 222 # referring to this. 223 + apply = 224 + inputBuildPlatform: 225 + let 226 + elaborated = lib.systems.elaborate inputBuildPlatform; 227 + in 228 + if lib.systems.equals elaborated cfg.hostPlatform then 229 + cfg.hostPlatform # make identical, so that `==` equality works; see https://github.com/NixOS/nixpkgs/issues/278001 230 + else 231 + elaborated; 223 232 defaultText = lib.literalExpression ''config.nixpkgs.hostPlatform''; 224 233 description = '' 225 234 Specifies the platform on which NixOS should be built. ··· 236 245 }; 237 246 238 247 localSystem = lib.mkOption { 239 - type = lib.types.attrs; 248 + type = lib.types.attrs; # TODO utilize lib.systems.parsedPlatform 240 249 default = { inherit (cfg) system; }; 241 250 example = { 242 251 system = "aarch64-linux"; 243 252 }; 253 + # Make sure that the final value has all fields for sake of other modules 254 + # referring to this. TODO make `lib.systems` itself use the module system. 255 + apply = lib.systems.elaborate; 244 256 defaultText = lib.literalExpression ''(import "''${nixos}/../lib").lib.systems.examples.aarch64-multiplatform''; 245 257 description = '' 246 258 Systems with a recently generated `hardware-configuration.nix` ··· 268 280 # is a relation between at least 2 systems in the context of a 269 281 # specific build step, not a single system. 270 282 crossSystem = lib.mkOption { 271 - type = lib.types.nullOr lib.types.attrs; 283 + type = lib.types.nullOr lib.types.attrs; # TODO utilize lib.systems.parsedPlatform 272 284 default = null; 273 285 example = { 274 286 system = "aarch64-linux"; ··· 402 414 403 415 Defined in: 404 416 ${lib.concatMapStringsSep "\n" (file: " - ${file}") opt.config.files} 405 - ''; 406 - } 407 - { 408 - assertion = 409 - (opt.hostPlatform.isDefined -> builtins.isAttrs cfg.buildPlatform -> !(cfg.buildPlatform ? parsed)) 410 - && (opt.hostPlatform.isDefined -> builtins.isAttrs cfg.hostPlatform -> !(cfg.hostPlatform ? parsed)) 411 - && (builtins.isAttrs cfg.localSystem -> !(cfg.localSystem ? parsed)) 412 - && (builtins.isAttrs cfg.crossSystem -> !(cfg.crossSystem ? parsed)); 413 - message = '' 414 - Passing fully elaborated systems to `nixpkgs.localSystem`, `nixpkgs.crossSystem`, `nixpkgs.buildPlatform` 415 - or `nixpkgs.hostPlatform` will break composability of package sets in nixpkgs. For example, pkgs.pkgsStatic 416 - would not work in modules anymore. 417 417 ''; 418 418 } 419 419 ];
+19 -6
nixos/modules/misc/nixpkgs/read-only.nix
··· 40 40 The Nixpkgs overlays that `pkgs` was initialized with. 41 41 ''; 42 42 }; 43 - # buildPlatform and hostPlatform left out on purpose: 44 - # - They are not supposed to be changed with this read-only module. 45 - # - They are not supposed to be read either, according to the description 46 - # of "system" in the traditional nixpkgs module. 47 - # 43 + hostPlatform = mkOption { 44 + internal = true; 45 + readOnly = true; 46 + description = '' 47 + The platform of the machine that is running the NixOS configuration. 48 + ''; 49 + }; 50 + buildPlatform = mkOption { 51 + internal = true; 52 + readOnly = true; 53 + description = '' 54 + The platform of the machine that built the NixOS configuration. 55 + ''; 56 + }; 48 57 # NOTE: do not add the legacy options such as localSystem here. Let's keep 49 58 # this module simple and let module authors upgrade their code instead. 50 59 }; ··· 52 61 config = { 53 62 _module.args.pkgs = 54 63 # find mistaken definitions 55 - builtins.seq cfg.config builtins.seq cfg.overlays cfg.pkgs; 64 + builtins.seq cfg.config builtins.seq cfg.overlays builtins.seq cfg.hostPlatform builtins.seq 65 + cfg.buildPlatform 66 + cfg.pkgs; 56 67 nixpkgs.config = cfg.pkgs.config; 57 68 nixpkgs.overlays = cfg.pkgs.overlays; 69 + nixpkgs.hostPlatform = cfg.pkgs.stdenv.hostPlatform; 70 + nixpkgs.buildPlatform = cfg.pkgs.stdenv.buildPlatform; 58 71 }; 59 72 }
+1 -1
nixos/modules/programs/chromium.nix
··· 22 22 23 23 options = { 24 24 programs.chromium = { 25 - enable = lib.mkEnableOption "{command}`chromium` policies"; 25 + enable = lib.mkEnableOption "policies for chromium based browsers like Chromium, Google Chrome or Brave"; 26 26 27 27 enablePlasmaBrowserIntegration = lib.mkEnableOption "Native Messaging Host for Plasma Browser Integration"; 28 28
+8 -6
nixos/modules/services/web-apps/homebox.nix
··· 20 20 package = mkPackageOption pkgs "homebox" { }; 21 21 settings = lib.mkOption { 22 22 type = types.attrsOf types.str; 23 - defaultText = '' 24 - HBOX_STORAGE_DATA = "/var/lib/homebox/data"; 25 - HBOX_STORAGE_SQLITE_URL = "/var/lib/homebox/data/homebox.db?_pragma=busy_timeout=999&_pragma=journal_mode=WAL&_fk=1"; 26 - HBOX_OPTIONS_ALLOW_REGISTRATION = "false"; 27 - HBOX_OPTIONS_CHECK_GITHUB_RELEASE = "false"; 28 - HBOX_MODE = "production"; 23 + defaultText = lib.literalExpression '' 24 + { 25 + HBOX_STORAGE_DATA = "/var/lib/homebox/data"; 26 + HBOX_STORAGE_SQLITE_URL = "/var/lib/homebox/data/homebox.db?_pragma=busy_timeout=999&_pragma=journal_mode=WAL&_fk=1"; 27 + HBOX_OPTIONS_ALLOW_REGISTRATION = "false"; 28 + HBOX_OPTIONS_CHECK_GITHUB_RELEASE = "false"; 29 + HBOX_MODE = "production"; 30 + } 29 31 ''; 30 32 description = '' 31 33 The homebox configuration as Environment variables. For definitions and available options see the upstream
+2 -6
nixos/modules/virtualisation/nixos-containers.nix
··· 506 506 config = { 507 507 nixpkgs = 508 508 if options.nixpkgs?hostPlatform 509 - then { 510 - hostPlatform = 511 - if host.options.nixpkgs.hostPlatform.isDefined 512 - then host.config.nixpkgs.hostPlatform 513 - else lib.defaultTo host.config.nixpkgs.localSystem host.config.nixpkgs.crossSystem; 514 - } else { localSystem = lib.defaultTo host.config.nixpkgs.localSystem host.config.nixpkgs.crossSystem; } 509 + then { inherit (host.pkgs.stdenv) hostPlatform; } 510 + else { localSystem = host.pkgs.stdenv.hostPlatform; } 515 511 ; 516 512 boot.isContainer = true; 517 513 networking.hostName = mkDefault name;
+2 -2
nixos/tests/appliance-repart-image-verity-store.nix
··· 40 40 verityStore = { 41 41 enable = true; 42 42 # by default the module works with systemd-boot, for simplicity this test directly boots the UKI 43 - ukiPath = "/EFI/BOOT/BOOT${lib.toUpper pkgs.stdenv.hostPlatform.efiArch}.EFI"; 43 + ukiPath = "/EFI/BOOT/BOOT${lib.toUpper config.nixpkgs.hostPlatform.efiArch}.EFI"; 44 44 }; 45 45 46 46 name = "appliance-verity-store-image"; ··· 51 51 repartConfig = { 52 52 Type = "esp"; 53 53 Format = "vfat"; 54 - SizeMinBytes = if pkgs.stdenv.hostPlatform.isx86_64 then "64M" else "96M"; 54 + SizeMinBytes = if config.nixpkgs.hostPlatform.isx86_64 then "64M" else "96M"; 55 55 }; 56 56 }; 57 57 ${partitionIds.store-verity}.repartConfig = {
+2 -2
nixos/tests/appliance-repart-image.nix
··· 53 53 "esp" = { 54 54 contents = 55 55 let 56 - efiArch = pkgs.stdenv.hostPlatform.efiArch; 56 + efiArch = config.nixpkgs.hostPlatform.efiArch; 57 57 in 58 58 { 59 59 "/EFI/BOOT/BOOT${lib.toUpper efiArch}.EFI".source = ··· 70 70 # aarch64 kernel seems to generally be a little bigger than the 71 71 # x86_64 kernel. To stay on the safe side, leave some more slack 72 72 # for every platform other than x86_64. 73 - SizeMinBytes = if pkgs.stdenv.hostPlatform.isx86_64 then "64M" else "96M"; 73 + SizeMinBytes = if config.nixpkgs.hostPlatform.isx86_64 then "64M" else "96M"; 74 74 }; 75 75 }; 76 76 "swap" = {
+2 -2
pkgs/applications/misc/rofi/wayland.nix
··· 10 10 11 11 rofi-unwrapped.overrideAttrs (oldAttrs: rec { 12 12 pname = "rofi-wayland-unwrapped"; 13 - version = "1.7.7+wayland1"; 13 + version = "1.7.8+wayland1"; 14 14 15 15 src = fetchFromGitHub { 16 16 owner = "lbonn"; 17 17 repo = "rofi"; 18 18 rev = version; 19 19 fetchSubmodules = true; 20 - hash = "sha256-wGBB7h2gZRQNmHV0NIbD0vvHtKZqnT5hd2gz5smKGoU="; 20 + hash = "sha256-6hQfy0c73z1Oi2mGjuhKLZQIBpG1u06v40dmlc5fL/w="; 21 21 }; 22 22 23 23 depsBuildBuild = oldAttrs.depsBuildBuild ++ [ pkg-config ];
+2 -2
pkgs/by-name/hi/hifile/package.nix
··· 5 5 }: 6 6 7 7 let 8 - version = "0.9.9.15"; 8 + version = "0.9.9.16"; 9 9 pname = "hifile"; 10 10 11 11 src = fetchurl { 12 12 url = "https://www.hifile.app/files/HiFile-${version}.AppImage"; 13 - hash = "sha256-Q0clcmBLWt8qDzHYjRRbwyZBSWW//yBTbRcnRjrSlzM="; 13 + hash = "sha256-/5ZAAq6yQQZ8NxlCeXp1jJ+fqewIGuBGD+KpjirfCjU="; 14 14 }; 15 15 16 16 appimageContents = appimageTools.extractType2 {
+2 -2
pkgs/by-name/li/limesurvey/package.nix
··· 8 8 9 9 stdenv.mkDerivation rec { 10 10 pname = "limesurvey"; 11 - version = "6.6.5+240924"; 11 + version = "6.10.2+250127"; 12 12 13 13 src = fetchFromGitHub { 14 14 owner = "LimeSurvey"; 15 15 repo = "LimeSurvey"; 16 16 rev = version; 17 - hash = "sha256-CuuTFCDY7jnF2njZdyB6e8/nRf0n0ybKgZ0QscC2IAI="; 17 + hash = "sha256-2ZRN2zbrrGWTXgsPeRWsQbg1qw2vVIAwzUI0LWgCL9g="; 18 18 }; 19 19 20 20 phpConfig = writeText "config.php" ''
+3 -3
pkgs/by-name/op/open-webui/package.nix
··· 7 7 }: 8 8 let 9 9 pname = "open-webui"; 10 - version = "0.5.7"; 10 + version = "0.5.9"; 11 11 12 12 src = fetchFromGitHub { 13 13 owner = "open-webui"; 14 14 repo = "open-webui"; 15 15 tag = "v${version}"; 16 - hash = "sha256-spdwd3ffibmHb9LDgK1EkpUAK6OsD9d6gocrbEx/CrE="; 16 + hash = "sha256-r4jl1WNI8tyhwyYbTZ+Q52xvv3PJY2FvhexMYHIIDPg="; 17 17 }; 18 18 19 19 frontend = buildNpmPackage { 20 20 inherit pname version src; 21 21 22 - npmDepsHash = "sha256-9wu5SWtom/pZrFRP8rrsZMoGEnN4MVAlkyeydr0Fslo="; 22 + npmDepsHash = "sha256-PAX3aa0WdvCBvAD8AGQYqnx5Sd/85luMqP6hAyICyhA="; 23 23 24 24 # Disabling `pyodide:fetch` as it downloads packages during `buildPhase` 25 25 # Until this is solved, running python packages from the browser will not work.
+5 -3
pkgs/by-name/pm/pmccabe/package.nix
··· 13 13 sha256 = "0a3h1b9fb87c82d5fbql5lc4gp338pa5s9i66dhw7zk8jdygx474"; 14 14 }; 15 15 16 - patches = [ 17 - ./getopt_on_darwin.patch 18 - ]; 16 + patches = [ ./getopt_on_darwin.patch ]; 17 + 18 + # GCC 14 made implicit function declarations an error. With this switch we turn them 19 + # back into a warning. 20 + env.NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration"; 19 21 20 22 configurePhase = '' 21 23 sed -i -r Makefile \
-10
pkgs/by-name/rt/rtfm/enable-write-permissions.patch
··· 1 - --- a/src/doc2dash/docset_builder.cr 2024-04-20 10:45:32.000673168 +0300 2 - +++ b/src/doc2dash/docset_builder.cr 2024-04-20 10:45:56.072895349 +0300 3 - @@ -44,6 +44,7 @@ 4 - real_dest = @html_dest.join(dest || source) 5 - Dir.mkdir_p(Path.new(real_dest).dirname) 6 - File.copy(original, real_dest) 7 - + File.chmod(real_dest, 0o600) 8 - dest || source 9 - end 10 -
-39
pkgs/by-name/rt/rtfm/make.patch
··· 1 - --- a/Makefile 2024-04-20 10:28:36.697545022 +0300 2 - +++ b/Makefile 2024-04-20 10:37:55.591657540 +0300 3 - @@ -7,8 +7,10 @@ 4 - shards build --debug -Dpreview_mt 5 - 6 - configure: 7 - - shards install 8 - - ./bin/gi-crystal 9 - + mkdir bin/ 10 - + cd lib/gi-crystal && shards build -Dpreview_mt --release --no-debug 11 - + cd ../.. 12 - + cp lib/gi-crystal/bin/gi-crystal bin/ && ./bin/gi-crystal 13 - 14 - rtfm: 15 - shards build --release -Dpreview_mt rtfm 16 - @@ -16,10 +18,10 @@ 17 - docsets: crystal-docset gtk-docset 18 - 19 - crystal-docset: 20 - - crystal run src/doc2dash/create_crystal_docset.cr 21 - + crystal src/doc2dash/create_crystal_docset.cr "@crystal@/share/doc/crystal/api" 22 - 23 - gtk-docset: 24 - - crystal run src/doc2dash/create_gtk_docset.cr 25 - + crystal src/doc2dash/create_gtk_docset.cr "gtk-doc/" 26 - 27 - test: crystal-docset gtk-docset 28 - crystal spec 29 - @@ -28,8 +30,10 @@ 30 - install -D -m 0755 bin/rtfm $(DESTDIR)$(PREFIX)/bin/rtfm 31 - install -D -m 0644 data/io.github.hugopl.rtfm.desktop $(DESTDIR)$(PREFIX)/share/applications/io.github.hugopl.rtfm.desktop 32 - install -D -m 0644 data/icons/hicolor/scalable/apps/io.github.hugopl.rtfm.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/io.github.hugopl.rtfm.svg 33 - + gtk4-update-icon-cache --ignore-theme-index $(PREFIX)/share/icons/hicolor 34 - # Settings schema 35 - install -D -m644 data/io.github.hugopl.rtfm.gschema.xml $(DESTDIR)$(PREFIX)/share/glib-2.0/schemas/io.github.hugopl.rtfm.gschema.xml 36 - + glib-compile-schemas $(DESTDIR)$(PREFIX)/share/glib-2.0/schemas 37 - # docsets 38 - mkdir -p $(DESTDIR)$(PREFIX)/share/rtfm/docsets/ 39 - cp -r data/Crystal.docset $(DESTDIR)$(PREFIX)/share/rtfm/docsets/
+79 -47
pkgs/by-name/rt/rtfm/package.nix
··· 2 2 stdenv, 3 3 lib, 4 4 fetchFromGitHub, 5 - crystal, 5 + crystal_1_14, 6 6 wrapGAppsHook4, 7 7 gobject-introspection, 8 8 desktopToDarwinBundle, ··· 10 10 sqlite, 11 11 libadwaita, 12 12 gtk4, 13 + glib, 13 14 pango, 14 - replaceVars, 15 + symlinkJoin, 16 + gitUpdater, 17 + _experimental-update-script-combinators, 18 + runCommand, 19 + crystal2nix, 20 + writeShellScript, 15 21 }: 16 22 let 17 - gtk4' = gtk4.override { x11Support = true; }; 18 - pango' = pango.override { withIntrospection = true; }; 19 - in 20 - crystal.buildCrystalPackage rec { 21 - pname = "rtfm"; 22 - version = "0.5.0"; 23 + version = "0.6.0"; 23 24 24 25 src = fetchFromGitHub { 25 26 owner = "hugopl"; 26 27 repo = "rtfm"; 27 - rev = "v${version}"; 28 - name = "rtfm"; 29 - hash = "sha256-+s7KXl3+j/BaneOBqVAMJJhmrG6xtcGaHhYnMvUfiVA="; 28 + tag = "v${version}"; 29 + hash = "sha256-KuxGQs7TPn2Lmgk/NjfoRsBtkTY0GC/DOUlQZXCdRXE="; 30 30 }; 31 31 32 - patches = [ 33 - # 1) fixed gi-crystal binding generator command 34 - # 2) fixed docset generator command 35 - # 3) added commands to build gschemas and update icon-cache 36 - (replaceVars ./make.patch { 37 - inherit crystal; 38 - }) 39 - # added chmod +w for copied docs to prevent error: 40 - # `Error opening file with mode 'wb': '.../style.css': Permission denied` 41 - ./enable-write-permissions.patch 42 - ]; 32 + gtk-doc = 33 + let 34 + gtk4' = gtk4.override { x11Support = true; }; 35 + pango' = pango.override { withIntrospection = true; }; 36 + in 37 + symlinkJoin { 38 + name = "gtk-doc"; 39 + paths = [ 40 + gtk4'.devdoc 41 + pango'.devdoc 42 + glib.devdoc 43 + libadwaita.devdoc 44 + webkitgtk_6_0.devdoc 45 + ]; 46 + }; 47 + in 48 + crystal_1_14.buildCrystalPackage { 49 + pname = "rtfm"; 50 + inherit version src; 51 + 52 + shardsFile = ./shards.nix; 53 + copyShardDeps = true; 43 54 44 55 postPatch = '' 45 56 substituteInPlace src/doc2dash/create_gtk_docset.cr \ 46 - --replace-fail 'basedir = Path.new("/usr/share/doc")' 'basedir = Path.new(ARGV[0]? || "gtk-docs")' 57 + --replace-fail 'basedir = Path.new("/usr/share/doc")' 'basedir = Path.new(ARGV[0]? || "${gtk-doc}/share/doc")' \ 58 + --replace-fail 'webkit2gtk-4.0' 'webkitgtk-6.0' 59 + substituteInPlace src/doc2dash/create_crystal_docset.cr \ 60 + --replace-fail 'doc_source = Path.new(ARGV[0]? || "/usr/share/doc/crystal/api")' 'doc_source = Path.new(ARGV[0]? || "${crystal_1_14}/share/doc/crystal/api")' 61 + substituteInPlace src/doc2dash/docset_builder.cr \ 62 + --replace-fail 'File.copy(original, real_dest)' 'File.copy(original, real_dest); File.chmod(real_dest, 0o600)' 63 + substituteInPlace Makefile \ 64 + --replace-fail 'shards install' 'true' 47 65 ''; 48 66 49 - shardsFile = ./shards.nix; 50 - copyShardDeps = true; 67 + preBuild = '' 68 + cd lib/gi-crystal 69 + shards build -Dpreview_mt --release --no-debug 70 + cd ../.. 71 + mkdir bin/ 72 + cp lib/gi-crystal/bin/gi-crystal bin/ 73 + ''; 74 + 75 + buildTargets = [ "all" ]; 51 76 52 77 nativeBuildInputs = [ 53 78 wrapGAppsHook4 ··· 58 83 webkitgtk_6_0 59 84 sqlite 60 85 libadwaita 61 - gtk4' 62 - pango' 86 + gtk4 87 + pango 63 88 ]; 64 89 65 - buildTargets = [ 66 - "configure" 67 - "rtfm" 68 - "docsets" 69 - ]; 90 + postInstall = '' 91 + glib-compile-schemas $out/share/glib-2.0/schemas 92 + ''; 70 93 71 - preBuild = '' 72 - mkdir gtk-doc/ 73 - 74 - for file in "${gtk4'.devdoc}"/share/doc/*; do 75 - ln -s "$file" "gtk-doc/$(basename "$file")" 76 - done 77 - 78 - for file in "${pango'.devdoc}"/share/doc/*; do 79 - ln -s "$file" "gtk-doc/$(basename "$file")" 80 - done 81 - 82 - for file in "${libadwaita.devdoc}"/share/doc/*; do 83 - ln -s "$file" "gtk-doc/$(basename "$file")" 84 - done 85 - ''; 94 + passthru = { 95 + updateScript = _experimental-update-script-combinators.sequence [ 96 + (gitUpdater { rev-prefix = "v"; }) 97 + (_experimental-update-script-combinators.copyAttrOutputToFile "rtfm.shardLock" "./shard.lock") 98 + { 99 + command = [ 100 + (writeShellScript "update-lock" "cd $1; ${lib.getExe crystal2nix}") 101 + ./. 102 + ]; 103 + supportedFeatures = [ "silent" ]; 104 + } 105 + { 106 + command = [ 107 + "rm" 108 + "./shard.lock" 109 + ]; 110 + supportedFeatures = [ "silent" ]; 111 + } 112 + ]; 113 + shardLock = runCommand "shard.lock" { inherit src; } '' 114 + cp $src/shard.lock $out 115 + ''; 116 + }; 86 117 87 118 meta = with lib; { 88 119 description = "Dash/docset reader with built in documentation for Crystal and GTK APIs"; ··· 90 121 license = licenses.mit; 91 122 mainProgram = "rtfm"; 92 123 maintainers = with maintainers; [ sund3RRR ]; 124 + platforms = platforms.unix; 93 125 }; 94 126 }
+7 -7
pkgs/by-name/rt/rtfm/shards.nix
··· 6 6 }; 7 7 fzy = { 8 8 url = "https://github.com/hugopl/fzy.git"; 9 - rev = "6c2395bcdea1889969d0d08c16163c276fe4e473"; 10 - sha256 = "0vpradafkwckfsq7wqrgkpsli7bfmgc27d38q06l1jzq0z0j92rw"; 9 + rev = "v0.6.0"; 10 + sha256 = "1mpw3ridzvqkf807wik6wzwpzcsk0075kifagsfnz38vx1mw2y55"; 11 11 }; 12 12 gi-crystal = { 13 13 url = "https://github.com/hugopl/gi-crystal.git"; 14 - rev = "v0.22.2"; 15 - sha256 = "0bpa1f8iaf97z2kbgjc7nc8km7nd7bppiwna319lm2hvm8m5pw15"; 14 + rev = "v0.24.0"; 15 + sha256 = "0x356xn35008l573qhyl1sdddc9cc5i3bsa4c7865kgq9521ifyh"; 16 16 }; 17 17 gtk4 = { 18 18 url = "https://github.com/hugopl/gtk4.cr.git"; 19 - rev = "v0.16.1"; 20 - sha256 = "1cqkbh072y70l8g0p040vf50k920p32ry1larnwn9mqabd74jwaj"; 19 + rev = "v0.17.0"; 20 + sha256 = "0lv3nvsanxi4g2322zvkf1jxx5zgzaapk228vcw2cl0ja1drm06d"; 21 21 }; 22 22 harfbuzz = { 23 23 url = "https://github.com/hugopl/harfbuzz.cr.git"; ··· 25 25 sha256 = "06wgqxwyib5416yp53j2iwcbr3bl4jjxb1flm7z103l365par694"; 26 26 }; 27 27 libadwaita = { 28 - url = "https://github.com/geopjr/libadwaita.cr.git"; 28 + url = "https://github.com/hugopl/libadwaita.cr.git"; 29 29 rev = "cffabb56e911d2a90c53c2fd14d6bd08bf5ac446"; 30 30 sha256 = "0gcq04vgxg0vff9fcalgzq9phq0y76diihkzhlfn91bdxwkx7rl3"; 31 31 };
+2 -2
pkgs/by-name/si/sing-box/package.nix
··· 12 12 13 13 buildGoModule rec { 14 14 pname = "sing-box"; 15 - version = "1.11.0"; 15 + version = "1.11.1"; 16 16 17 17 src = fetchFromGitHub { 18 18 owner = "SagerNet"; 19 19 repo = pname; 20 20 rev = "v${version}"; 21 - hash = "sha256-or3RklqfrDIC2ZHJ7jDs1y+118/OsJiRKyDt1NCWqfI="; 21 + hash = "sha256-W/b3pAyeTQiBZ5T8u74JITlAfJ5fmWn8DUUTw9tAZTk="; 22 22 }; 23 23 24 24 vendorHash = "sha256-NWHDEN7aQWR3DXp9nFNhxDXFMeBsCk8/ZzCcT/zgwmI=";
+3 -3
pkgs/by-name/sy/syn2mas/package.nix
··· 6 6 7 7 buildNpmPackage rec { 8 8 pname = "syn2mas"; 9 - version = "0.12.0"; 9 + version = "0.13.0"; 10 10 11 11 src = fetchFromGitHub { 12 12 owner = "element-hq"; 13 13 repo = "matrix-authentication-service"; 14 14 rev = "v${version}"; 15 - hash = "sha256-QLtyYxV2yXHJtwWgGcyi7gRcKypYoy9Z8bkEuTopVXc="; 15 + hash = "sha256-rFex6stw++xNrcCYnYn3N0HrUQd91DAw9QU0R2MUzyQ="; 16 16 }; 17 17 18 18 sourceRoot = "${src.name}/tools/syn2mas"; 19 19 20 - npmDepsHash = "sha256-pRa5qqLsI8Hx9v5tMPDkehczXZjWWAOjfDfLLh2V6Q4="; 20 + npmDepsHash = "sha256-liwFM3HkZtZTJmaqF/7WvYxf2EKgjNF5xCHP/OxFK/k="; 21 21 22 22 dontBuild = true; 23 23
+4 -2
pkgs/by-name/th/the-powder-toy/package.nix
··· 13 13 meson, 14 14 ninja, 15 15 pkg-config, 16 + python3, 16 17 SDL2, 17 18 stdenv, 18 19 zlib, 19 20 }: 20 21 stdenv.mkDerivation rec { 21 22 pname = "the-powder-toy"; 22 - version = "98.2.365"; 23 + version = "99.0.377"; 23 24 24 25 src = fetchFromGitHub { 25 26 owner = "The-Powder-Toy"; 26 27 repo = "The-Powder-Toy"; 27 28 tag = "v${version}"; 28 - hash = "sha256-S2aUa25EnUfX6ShW6D+wHrsTLxTcCFcZ/uLE9EWGu4Q="; 29 + hash = "sha256-U8qgA/YZ10Vy1uuPtOZ7sEIV3sC2mtmC8y7O9FUE62Y="; 29 30 }; 30 31 31 32 nativeBuildInputs = [ 32 33 meson 33 34 ninja 34 35 pkg-config 36 + python3 35 37 ] ++ lib.optional stdenv.hostPlatform.isLinux copyDesktopItems; 36 38 37 39 buildInputs = [
pkgs/by-name/vi/vistafonts-chs/no-op.conf pkgs/by-name/vi/vista-fonts-chs/no-op.conf
+9 -1
pkgs/by-name/vi/vistafonts-chs/package.nix pkgs/by-name/vi/vista-fonts-chs/package.nix
··· 13 13 url = "https://web.archive.org/web/20161221192937if_/http://download.microsoft.com/download/d/6/e/d6e2ff26-5821-4f35-a18b-78c963b1535d/VistaFont_CHS.EXE"; 14 14 # Alternative mirror: 15 15 # http://www.eeo.cn/download/font/VistaFont_CHS.EXE 16 - sha256 = "1qwm30b8aq9piyqv07hv8b5bac9ms40rsdf8pwix5dyk8020i8xi"; 16 + hash = "sha256-saMIBEDTt9Ijv8g1nQHRNTG1ykIbHrCxjzdhhRYYleM="; 17 17 }; 18 18 19 19 nativeBuildInputs = [ cabextract ]; 20 20 21 21 unpackPhase = '' 22 + runHook preUnpack 23 + 22 24 cabextract --lowercase --filter '*.TTF' $src 25 + 26 + runHook postUnpack 23 27 ''; 24 28 25 29 installPhase = '' 30 + runHook preInstall 31 + 26 32 mkdir -p $out/share/fonts/truetype 27 33 cp *.ttf $out/share/fonts/truetype 28 34 ··· 31 37 mkdir -p $out/etc/fonts/conf.d 32 38 substitute ${./no-op.conf} $out/etc/fonts/conf.d/30-msyahei.conf \ 33 39 --subst-var-by fontname "Microsoft YaHei" 40 + 41 + runHook postInstall 34 42 ''; 35 43 36 44 meta = {
pkgs/by-name/vi/vistafonts-cht/no-op.conf pkgs/by-name/vi/vista-fonts-cht/no-op.conf
+13 -5
pkgs/by-name/vi/vistafonts-cht/package.nix pkgs/by-name/vi/vista-fonts-cht/package.nix
··· 11 11 12 12 src = fetchurl { 13 13 url = "https://download.microsoft.com/download/7/6/b/76bd7a77-be02-47f3-8472-fa1de7eda62f/VistaFont_CHT.EXE"; 14 - sha256 = "sha256-fSnbbxlMPzbhFSQyKxQaS5paiWji8njK7tS8Eppsj6g="; 14 + hash = "sha256-fSnbbxlMPzbhFSQyKxQaS5paiWji8njK7tS8Eppsj6g="; 15 15 }; 16 16 17 17 nativeBuildInputs = [ cabextract ]; 18 18 19 19 unpackPhase = '' 20 + runHook preUnpack 21 + 20 22 cabextract --lowercase --filter '*.TTF' $src 23 + 24 + runHook postUnpack 21 25 ''; 22 26 23 27 installPhase = '' 28 + runHook preInstall 29 + 24 30 mkdir -p $out/share/fonts/truetype 25 31 cp *.ttf $out/share/fonts/truetype 26 32 ··· 29 35 mkdir -p $out/etc/fonts/conf.d 30 36 substitute ${./no-op.conf} $out/etc/fonts/conf.d/30-msjhenghei.conf \ 31 37 --subst-var-by fontname "Microsoft JhengHei" 38 + 39 + runHook postInstall 32 40 ''; 33 41 34 - meta = with lib; { 42 + meta = { 35 43 description = "TrueType fonts from Microsoft Windows Vista For Traditional Chinese (Microsoft JhengHei)"; 36 44 homepage = "https://www.microsoft.com/typography/fonts/family.aspx"; 37 - license = licenses.unfree; 38 - maintainers = with maintainers; [ atkinschang ]; 45 + license = lib.licenses.unfree; 46 + maintainers = with lib.maintainers; [ atkinschang ]; 39 47 40 48 # Set a non-zero priority to allow easy overriding of the 41 49 # fontconfig configuration files. 42 50 priority = 5; 43 - platforms = platforms.all; 51 + platforms = lib.platforms.all; 44 52 }; 45 53 }
pkgs/by-name/vi/vistafonts/no-op.conf pkgs/by-name/vi/vista-fonts/no-op.conf
+9 -1
pkgs/by-name/vi/vistafonts/package.nix pkgs/by-name/vi/vista-fonts/package.nix
··· 11 11 12 12 src = fetchurl { 13 13 url = "mirror://sourceforge/mscorefonts2/cabs/PowerPointViewer.exe"; 14 - sha256 = "07vhjdw8iip7gxk6wvp4myhvbn9619g10j9qvpbzz4ihima57ry4"; 14 + hash = "sha256-xOdTVI0wkv/X3ThJEF4KJtm1oa/kbm5mf+fGiHiTcB8="; 15 15 }; 16 16 17 17 nativeBuildInputs = [ cabextract ]; 18 18 19 19 unpackPhase = '' 20 + runHook preUnpack 21 + 20 22 cabextract --lowercase --filter ppviewer.cab $src 21 23 cabextract --lowercase --filter '*.TTF' ppviewer.cab 22 24 cabextract --lowercase --filter '*.TTC' ppviewer.cab 25 + 26 + runHook postUnpack 23 27 ''; 24 28 25 29 installPhase = '' 30 + runHook preInstall 31 + 26 32 mkdir -p $out/share/fonts/truetype 27 33 cp *.ttf *.ttc $out/share/fonts/truetype 28 34 ··· 33 39 substitute ${./no-op.conf} $out/etc/fonts/conf.d/30-''${name,,}.conf \ 34 40 --subst-var-by fontname $name 35 41 done 42 + 43 + runHook postInstall 36 44 ''; 37 45 38 46 meta = {
+4
pkgs/by-name/we/weblate/package.nix
··· 68 68 ${python.pythonOnBuildForHost.interpreter} manage.py compress 69 69 ''; 70 70 71 + pythonRelaxDeps = [ 72 + "rapidfuzz" 73 + ]; 74 + 71 75 dependencies = 72 76 with python.pkgs; 73 77 [
+2 -2
pkgs/development/python-modules/rapidfuzz/default.nix
··· 19 19 20 20 buildPythonPackage rec { 21 21 pname = "rapidfuzz"; 22 - version = "3.12.0"; 22 + version = "3.12.1"; 23 23 pyproject = true; 24 24 25 25 disabled = pythonOlder "3.9"; ··· 28 28 owner = "maxbachmann"; 29 29 repo = "RapidFuzz"; 30 30 tag = "v${version}"; 31 - hash = "sha256-BNhdN6nKAIIA2PXrpvdy35udklotoBAu2ghQFNwGvWE="; 31 + hash = "sha256-33NwGWulBJ7WAMAE0163OJM9kL04FuHa5P7m66PZL6s="; 32 32 }; 33 33 34 34 postPatch = ''
+3 -3
pkgs/servers/irc/solanum/default.nix
··· 16 16 17 17 stdenv.mkDerivation rec { 18 18 pname = "solanum"; 19 - version = "0-unstable-2024-07-24"; 19 + version = "0-unstable-2025-01-29"; 20 20 21 21 src = fetchFromGitHub { 22 22 owner = "solanum-ircd"; 23 23 repo = "solanum"; 24 - rev = "4e89f6603d63b2f8dfdec7a83161fb0343236349"; 25 - hash = "sha256-kUgB0Q+U6jx8Xyh1DSv8D7+Q9tC2wK3aaNt4At5chFQ="; 24 + rev = "7289d455e8f640b3a2607d8049de27f9099abe1c"; 25 + hash = "sha256-EQq8l48WgP8PuAyOoY6WU0FM1IHYBQisRojAUmyPOpM="; 26 26 }; 27 27 28 28 patches = [
-128
pkgs/test/top-level/stage.nix
··· 1 - # run like this: 2 - # nix-build pkgs/test/top-level/stage.nix 3 - { 4 - localSystem ? { 5 - system = builtins.currentSystem; 6 - }, 7 - }: 8 - 9 - with import ../../top-level { inherit localSystem; }; 10 - 11 - let 12 - # To silence platform specific evaluation errors 13 - discardEvaluationErrors = e: (builtins.tryEval e).success -> e; 14 - 15 - # Basic test for idempotency of the package set, i.e: 16 - # Applying the same package set twice should work and 17 - # not change anything. 18 - isIdempotent = set: discardEvaluationErrors (pkgs.${set}.stdenv == pkgs.${set}.${set}.stdenv); 19 - 20 - # Some package sets should be noops in certain circumstances. 21 - # This is very similar to the idempotency test, but not going 22 - # via the super' overlay. 23 - isNoop = 24 - parent: child: 25 - discardEvaluationErrors ( 26 - (lib.getAttrFromPath parent pkgs).stdenv == (lib.getAttrFromPath parent pkgs).${child}.stdenv 27 - ); 28 - 29 - allMuslExamples = builtins.attrNames ( 30 - lib.filterAttrs (_: system: lib.hasSuffix "-musl" system.config) lib.systems.examples 31 - ); 32 - 33 - allLLVMExamples = builtins.attrNames ( 34 - lib.filterAttrs (_: system: system.useLLVM or false) lib.systems.examples 35 - ); 36 - 37 - # A package set should only change specific configuration, but needs 38 - # to keep all other configuration from previous layers in place. 39 - # Each package set has one or more key characteristics for which we 40 - # test here. Those should be kept, even when applying the "set" package 41 - # set. 42 - isComposable = 43 - set: 44 - ( 45 - # Can't compose two different libcs... 46 - builtins.elem set [ "pkgsLLVMLibc" ] 47 - || discardEvaluationErrors ( 48 - pkgsCross.mingwW64.${set}.stdenv.hostPlatform.config == "x86_64-w64-mingw32" 49 - ) 50 - ) 51 - && ( 52 - # Can't compose two different libcs... 53 - builtins.elem set [ "pkgsLLVMLibc" ] 54 - || discardEvaluationErrors (pkgsCross.mingwW64.${set}.stdenv.hostPlatform.libc == "msvcrt") 55 - ) 56 - && discardEvaluationErrors (pkgsCross.ppc64-musl.${set}.stdenv.hostPlatform.gcc.abi == "elfv2") 57 - && discardEvaluationErrors ( 58 - builtins.elem "trivialautovarinit" pkgs.pkgsExtraHardening.${set}.stdenv.cc.defaultHardeningFlags 59 - ) 60 - && discardEvaluationErrors (pkgs.pkgsLLVM.${set}.stdenv.hostPlatform.useLLVM) 61 - && ( 62 - # Can't compose two different libcs... 63 - builtins.elem set [ 64 - "pkgsMusl" 65 - "pkgsStatic" 66 - ] 67 - || discardEvaluationErrors (pkgs.pkgsLLVMLibc.${set}.stdenv.hostPlatform.isLLVMLibc) 68 - ) 69 - && discardEvaluationErrors (pkgs.pkgsArocc.${set}.stdenv.hostPlatform.useArocc) 70 - && discardEvaluationErrors (pkgs.pkgsZig.${set}.stdenv.hostPlatform.useZig) 71 - && discardEvaluationErrors (pkgs.pkgsLinux.${set}.stdenv.buildPlatform.isLinux) 72 - && ( 73 - # Can't compose two different libcs... 74 - builtins.elem set [ "pkgsLLVMLibc" ] 75 - || discardEvaluationErrors (pkgs.pkgsMusl.${set}.stdenv.hostPlatform.isMusl) 76 - ) 77 - && discardEvaluationErrors (pkgs.pkgsStatic.${set}.stdenv.hostPlatform.isStatic) 78 - && discardEvaluationErrors (pkgs.pkgsi686Linux.${set}.stdenv.hostPlatform.isx86_32) 79 - && discardEvaluationErrors (pkgs.pkgsx86_64Darwin.${set}.stdenv.hostPlatform.isx86_64); 80 - in 81 - 82 - # Appends same defaultHardeningFlags again on each .pkgsExtraHardening - thus not idempotent. 83 - # assert isIdempotent "pkgsExtraHardening"; 84 - # TODO: Remove the isDarwin condition, which currently results in infinite recursion. 85 - # Also see https://github.com/NixOS/nixpkgs/pull/330567#discussion_r1894653309 86 - assert (stdenv.hostPlatform.isDarwin || isIdempotent "pkgsLLVM"); 87 - # TODO: This currently results in infinite recursion, even on Linux 88 - # assert isIdempotent "pkgsLLVMLibc"; 89 - assert isIdempotent "pkgsArocc"; 90 - assert isIdempotent "pkgsZig"; 91 - assert isIdempotent "pkgsLinux"; 92 - assert isIdempotent "pkgsMusl"; 93 - assert isIdempotent "pkgsStatic"; 94 - assert isIdempotent "pkgsi686Linux"; 95 - assert isIdempotent "pkgsx86_64Darwin"; 96 - 97 - assert isNoop [ "pkgsStatic" ] "pkgsMusl"; 98 - assert lib.all (sys: isNoop [ "pkgsCross" sys ] "pkgsMusl") allMuslExamples; 99 - assert lib.all (sys: isNoop [ "pkgsCross" sys ] "pkgsLLVM") allLLVMExamples; 100 - 101 - assert isComposable "pkgsExtraHardening"; 102 - assert isComposable "pkgsLLVM"; 103 - # TODO: Results in infinite recursion 104 - # assert isComposable "pkgsLLVMLibc"; 105 - assert isComposable "pkgsArocc"; 106 - # TODO: unexpected argument 'bintools' - uncomment once https://github.com/NixOS/nixpkgs/pull/331011 is done 107 - # assert isComposable "pkgsZig"; 108 - assert isComposable "pkgsMusl"; 109 - assert isComposable "pkgsStatic"; 110 - assert isComposable "pkgsi686Linux"; 111 - 112 - # Special cases regarding buildPlatform vs hostPlatform 113 - assert discardEvaluationErrors (pkgsCross.gnu64.pkgsMusl.stdenv.hostPlatform.isMusl); 114 - assert discardEvaluationErrors (pkgsCross.gnu64.pkgsi686Linux.stdenv.hostPlatform.isx86_32); 115 - assert discardEvaluationErrors (pkgsCross.mingwW64.pkgsLinux.stdenv.hostPlatform.isLinux); 116 - assert discardEvaluationErrors ( 117 - pkgsCross.aarch64-darwin.pkgsx86_64Darwin.stdenv.hostPlatform.isx86_64 118 - ); 119 - 120 - # pkgsCross should keep upper cross settings 121 - assert discardEvaluationErrors ( 122 - with pkgsStatic.pkgsCross.gnu64.stdenv.hostPlatform; isGnu && isStatic 123 - ); 124 - assert discardEvaluationErrors ( 125 - with pkgsLLVM.pkgsCross.musl64.stdenv.hostPlatform; isMusl && useLLVM 126 - ); 127 - 128 - emptyFile
+3
pkgs/top-level/aliases.nix
··· 1482 1482 viper4linux-gui = throw "'viper4linux-gui' was removed as it is broken and not maintained upstream"; # Added 2024-12-16 1483 1483 viper4linux = throw "'viper4linux' was removed as it is broken and not maintained upstream"; # Added 2024-12-16 1484 1484 virtscreen = throw "'virtscreen' has been removed, as it was broken and unmaintained"; # Added 2024-10-17 1485 + vistafonts = vista-fonts; # Added 2025-02-03 1486 + vistafonts-chs = vista-fonts-chs; # Added 2025-02-03 1487 + vistafonts-cht = vista-fonts-cht; # Added 2025-02-03 1485 1488 vkBasalt = vkbasalt; # Added 2022-11-22 1486 1489 vkdt-wayland = vkdt; # Added 2024-04-19 1487 1490 void = throw "'void' has been removed due to lack of upstream maintenance"; # Added 2025-01-25
+3 -3
pkgs/top-level/all-packages.nix
··· 1667 1667 # pkgsCross.aarch64-multiplatform.freshBootstrapTools.build 1668 1668 freshBootstrapTools = if stdenv.hostPlatform.isDarwin then 1669 1669 callPackage ../stdenv/darwin/make-bootstrap-tools.nix { 1670 - localSystem = { config = lib.systems.parse.tripleFromSystem stdenv.buildPlatform; }; 1670 + localSystem = stdenv.buildPlatform; 1671 1671 crossSystem = 1672 - if stdenv.buildPlatform == stdenv.hostPlatform then null else { config = lib.systems.parse.tripleFromSystem stdenv.hostPlatform; }; 1672 + if stdenv.buildPlatform == stdenv.hostPlatform then null else stdenv.hostPlatform; 1673 1673 } 1674 1674 else if stdenv.hostPlatform.isLinux then 1675 1675 callPackage ../stdenv/linux/make-bootstrap-tools.nix {} ··· 17722 17722 [( 17723 17723 { lib, ... }: { 17724 17724 config.nixpkgs.pkgs = lib.mkDefault pkgs; 17725 - config.nixpkgs.localSystem = lib.mkDefault ({ config = lib.systems.parse.tripleFromSystem stdenv.hostPlatform; }); 17725 + config.nixpkgs.localSystem = lib.mkDefault stdenv.hostPlatform; 17726 17726 } 17727 17727 )] ++ ( 17728 17728 if builtins.isList configuration
+11 -12
pkgs/top-level/default.nix
··· 46 46 ... 47 47 } @ args: 48 48 49 - # Passing fully elaborated systems to localSystem or crossSystem will break composability 50 - # of package sets. 51 - assert builtins.isAttrs localSystem -> !(localSystem ? parsed); 52 - assert builtins.isAttrs crossSystem -> !(crossSystem ? parsed); 53 - 54 49 let # Rename the function arguments 55 50 config0 = config; 56 51 crossSystem0 = crossSystem; ··· 127 122 config = lib.showWarnings configEval.config.warnings configEval.config; 128 123 129 124 # A few packages make a new package set to draw their dependencies from. 130 - # Rather than give `all-packages.nix` all the arguments to this function, 131 - # even ones that don't concern it, we give it this function to "re-call" 132 - # nixpkgs, inheriting whatever arguments it doesn't explicitly provide. This 133 - # way, `all-packages.nix` doesn't know more than it needs to. 125 + # (Currently to get a cross tool chain, or forced-i686 package.) Rather than 126 + # give `all-packages.nix` all the arguments to this function, even ones that 127 + # don't concern it, we give it this function to "re-call" nixpkgs, inheriting 128 + # whatever arguments it doesn't explicitly provide. This way, 129 + # `all-packages.nix` doesn't know more than it needs too. 134 130 # 135 131 # It's OK that `args` doesn't include default arguments from this file: 136 132 # they'll be deterministically inferred. In fact we must *not* include them, 137 133 # because it's important that if some parameter which affects the default is 138 134 # substituted with a different argument, the default is re-inferred. 139 135 # 140 - # To put this in concrete terms, we want the provided non-native `localSystem` 141 - # and `crossSystem` arguments to affect the stdenv chosen. 136 + # To put this in concrete terms, this function is basically just used today to 137 + # use package for a different platform for the current platform (namely cross 138 + # compiling toolchains and 32-bit packages on x86_64). In both those cases we 139 + # want the provided non-native `localSystem` argument to affect the stdenv 140 + # chosen. 142 141 # 143 142 # NB!!! This thing gets its `config` argument from `args`, i.e. it's actually 144 143 # `config0`. It is important to keep it to `config0` format (as opposed to the ··· 147 146 # via `evalModules` is not idempotent. In other words, if you add `config` to 148 147 # `newArgs`, expect strange very hard to debug errors! (Yes, I'm speaking from 149 148 # experience here.) 150 - nixpkgsFun = f0: import ./. (args // f0 args); 149 + nixpkgsFun = newArgs: import ./. (args // newArgs); 151 150 152 151 # Partially apply some arguments for building bootstraping stage pkgs 153 152 # sets. Only apply arguments which no stdenv would want to override.
+123 -83
pkgs/top-level/stage.nix
··· 180 180 ((config.packageOverrides or (super: {})) super); 181 181 182 182 # Convenience attributes for instantitating package sets. Each of 183 - # these will instantiate a new version of allPackages. 184 - otherPackageSets = let 185 - mkPkgs = name: fn: nixpkgsFun (prevArgs: let nixpkgsArgs = fn prevArgs; in nixpkgsArgs // { 186 - overlays = [ 187 - (self': super': { 188 - "${name}" = super'; 189 - }) 190 - ] ++ nixpkgsArgs.overlays or [] ++ prevArgs.overlays or []; 191 - }); 192 - # This is always cross. 193 - mkCrossPkgs = name: crossAttrs: mkPkgs name (prevArgs: { 194 - crossSystem = 195 - (lib.systems.systemToAttrs (lib.defaultTo prevArgs.localSystem prevArgs.crossSystem or null)) // crossAttrs; 196 - }); 197 - # This is only cross when we are already cross, otherwise local. 198 - # For the case of "native cross", i.e. pkgsCross.gnu64 on a x86_64-linux system, we need to adjust **both** 199 - # localSystem **and** crossSystem, otherwise they're out of sync. 200 - mkHybridPkgs = name: hybridAttrs: mkPkgs name (prevArgs: let 201 - newSystem = (lib.systems.systemToAttrs (lib.defaultTo prevArgs.localSystem prevArgs.crossSystem or null)) // hybridAttrs; 202 - in { crossSystem = newSystem; } 203 - // lib.optionalAttrs (stdenv.hostPlatform == stdenv.buildPlatform) { localSystem = newSystem; } 204 - ); 205 - in self: super: { 183 + # these will instantiate a new version of allPackages. Currently the 184 + # following package sets are provided: 185 + # 186 + # - pkgsCross.<system> where system is a member of lib.systems.examples 187 + # - pkgsMusl 188 + # - pkgsi686Linux 189 + otherPackageSets = self: super: { 206 190 # This maps each entry in lib.systems.examples to its own package 207 191 # set. Each of these will contain all packages cross compiled for 208 192 # that target system. For instance, pkgsCross.raspberryPi.hello, 209 193 # will refer to the "hello" package built for the ARM6-based 210 194 # Raspberry Pi. 211 195 pkgsCross = lib.mapAttrs (n: crossSystem: 212 - nixpkgsFun (prevArgs: { crossSystem = (lib.systems.systemToAttrs (lib.defaultTo { } prevArgs.crossSystem or null)) // crossSystem; })) 196 + nixpkgsFun { inherit crossSystem; }) 213 197 lib.systems.examples; 214 198 215 - # Bootstrap a cross stdenv using the LLVM toolchain. 216 - # This is currently not possible when compiling natively. 217 - pkgsLLVM = mkCrossPkgs "pkgsLLVM" { 218 - useLLVM = true; 219 - linker = "lld"; 199 + pkgsLLVM = nixpkgsFun { 200 + overlays = [ 201 + (self': super': { 202 + pkgsLLVM = super'; 203 + }) 204 + ] ++ overlays; 205 + # Bootstrap a cross stdenv using the LLVM toolchain. 206 + # This is currently not possible when compiling natively, 207 + # so we don't need to check hostPlatform != buildPlatform. 208 + crossSystem = stdenv.hostPlatform // { 209 + useLLVM = true; 210 + linker = "lld"; 211 + }; 220 212 }; 221 213 222 - # Bootstrap a cross stdenv using LLVM libc. 223 - # This is currently not possible when compiling natively. 224 - pkgsLLVMLibc = mkCrossPkgs "pkgsLLVMLibc" { 225 - config = lib.systems.parse.tripleFromSystem (makeLLVMParsedPlatform stdenv.hostPlatform.parsed); 226 - libc = "llvm"; 214 + pkgsLLVMLibc = nixpkgsFun { 215 + overlays = [ (self': super': { 216 + pkgsLLVMLibc = super'; 217 + })] ++ overlays; 218 + # Bootstrap a cross stdenv using LLVM libc. 219 + # This is currently not possible when compiling natively, 220 + # so we don't need to check hostPlatform != buildPlatform. 221 + crossSystem = stdenv.hostPlatform // { 222 + config = lib.systems.parse.tripleFromSystem (makeLLVMParsedPlatform stdenv.hostPlatform.parsed); 223 + libc = "llvm"; 224 + }; 227 225 }; 228 226 229 - # Bootstrap a cross stdenv using the Aro C compiler. 230 - # This is currently not possible when compiling natively. 231 - pkgsArocc = mkCrossPkgs "pkgsArocc" { 232 - useArocc = true; 233 - linker = "lld"; 227 + pkgsArocc = nixpkgsFun { 228 + overlays = [ 229 + (self': super': { 230 + pkgsArocc = super'; 231 + }) 232 + ] ++ overlays; 233 + # Bootstrap a cross stdenv using the Aro C compiler. 234 + # This is currently not possible when compiling natively, 235 + # so we don't need to check hostPlatform != buildPlatform. 236 + crossSystem = stdenv.hostPlatform // { 237 + useArocc = true; 238 + linker = "lld"; 239 + }; 234 240 }; 235 241 236 - # Bootstrap a cross stdenv using the Zig toolchain. 237 - # This is currently not possible when compiling natively. 238 - pkgsZig = mkCrossPkgs "pkgsZig" { 239 - useZig = true; 240 - linker = "lld"; 242 + pkgsZig = nixpkgsFun { 243 + overlays = [ 244 + (self': super': { 245 + pkgsZig = super'; 246 + }) 247 + ] ++ overlays; 248 + # Bootstrap a cross stdenv using the Zig toolchain. 249 + # This is currently not possible when compiling natively, 250 + # so we don't need to check hostPlatform != buildPlatform. 251 + crossSystem = stdenv.hostPlatform // { 252 + useZig = true; 253 + linker = "lld"; 254 + }; 241 255 }; 242 256 243 257 # All packages built with the Musl libc. This will override the 244 258 # default GNU libc on Linux systems. Non-Linux systems are not 245 259 # supported. 32-bit is also not supported. 246 - pkgsMusl = if stdenv.hostPlatform.isLinux && stdenv.buildPlatform.is64bit then mkHybridPkgs "pkgsMusl" { 247 - config = lib.systems.parse.tripleFromSystem (makeMuslParsedPlatform stdenv.hostPlatform.parsed); 260 + pkgsMusl = if stdenv.hostPlatform.isLinux && stdenv.buildPlatform.is64bit then nixpkgsFun { 261 + overlays = [ (self': super': { 262 + pkgsMusl = super'; 263 + })] ++ overlays; 264 + ${if stdenv.hostPlatform == stdenv.buildPlatform 265 + then "localSystem" else "crossSystem"} = { 266 + config = lib.systems.parse.tripleFromSystem (makeMuslParsedPlatform stdenv.hostPlatform.parsed); 267 + }; 248 268 } else throw "Musl libc only supports 64-bit Linux systems."; 249 269 250 270 # All packages built for i686 Linux. 251 271 # Used by wine, firefox with debugging version of Flash, ... 252 - pkgsi686Linux = if stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isx86 then mkHybridPkgs "pkgsi686Linux" { 253 - config = lib.systems.parse.tripleFromSystem (stdenv.hostPlatform.parsed // { 254 - cpu = lib.systems.parse.cpuTypes.i686; 255 - }); 272 + pkgsi686Linux = if stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isx86 then nixpkgsFun { 273 + overlays = [ (self': super': { 274 + pkgsi686Linux = super'; 275 + })] ++ overlays; 276 + ${if stdenv.hostPlatform == stdenv.buildPlatform 277 + then "localSystem" else "crossSystem"} = { 278 + config = lib.systems.parse.tripleFromSystem (stdenv.hostPlatform.parsed // { 279 + cpu = lib.systems.parse.cpuTypes.i686; 280 + }); 281 + }; 256 282 } else throw "i686 Linux package set can only be used with the x86 family."; 257 283 258 284 # x86_64-darwin packages for aarch64-darwin users to use with Rosetta for incompatible packages 259 - pkgsx86_64Darwin = if stdenv.hostPlatform.isDarwin then mkHybridPkgs "pkgsx86_64Darwin" { 260 - config = lib.systems.parse.tripleFromSystem (stdenv.hostPlatform.parsed // { 261 - cpu = lib.systems.parse.cpuTypes.x86_64; 262 - }); 285 + pkgsx86_64Darwin = if stdenv.hostPlatform.isDarwin then nixpkgsFun { 286 + overlays = [ (self': super': { 287 + pkgsx86_64Darwin = super'; 288 + })] ++ overlays; 289 + localSystem = { 290 + config = lib.systems.parse.tripleFromSystem (stdenv.hostPlatform.parsed // { 291 + cpu = lib.systems.parse.cpuTypes.x86_64; 292 + }); 293 + }; 263 294 } else throw "x86_64 Darwin package set can only be used on Darwin systems."; 264 295 265 296 # If already linux: the same package set unaltered 266 - # Otherwise, return a linux package set for the current cpu architecture string. 297 + # Otherwise, return a natively built linux package set for the current cpu architecture string. 267 298 # (ABI and other details will be set to the default for the cpu/os pair) 268 299 pkgsLinux = 269 300 if stdenv.hostPlatform.isLinux 270 301 then self 271 - else mkHybridPkgs "pkgsLinux" { 272 - config = lib.systems.parse.tripleFromSystem (lib.systems.elaborate "${stdenv.hostPlatform.parsed.cpu.name}-linux").parsed; 302 + else nixpkgsFun { 303 + localSystem = lib.systems.elaborate "${stdenv.hostPlatform.parsed.cpu.name}-linux"; 273 304 }; 274 305 306 + # Extend the package set with zero or more overlays. This preserves 307 + # preexisting overlays. Prefer to initialize with the right overlays 308 + # in one go when calling Nixpkgs, for performance and simplicity. 309 + appendOverlays = extraOverlays: 310 + if extraOverlays == [] 311 + then self 312 + else nixpkgsFun { overlays = args.overlays ++ extraOverlays; }; 313 + 314 + # NOTE: each call to extend causes a full nixpkgs rebuild, adding ~130MB 315 + # of allocations. DO NOT USE THIS IN NIXPKGS. 316 + # 317 + # Extend the package set with a single overlay. This preserves 318 + # preexisting overlays. Prefer to initialize with the right overlays 319 + # in one go when calling Nixpkgs, for performance and simplicity. 320 + # Prefer appendOverlays if used repeatedly. 321 + extend = f: self.appendOverlays [f]; 322 + 275 323 # Fully static packages. 276 324 # Currently uses Musl on Linux (couldn’t get static glibc to work). 277 - pkgsStatic = mkCrossPkgs "pkgsStatic" ({ 278 - isStatic = true; 279 - } // lib.optionalAttrs stdenv.hostPlatform.isLinux { 280 - config = lib.systems.parse.tripleFromSystem (makeMuslParsedPlatform stdenv.hostPlatform.parsed); 281 - } // lib.optionalAttrs (stdenv.hostPlatform.system == "powerpc64-linux") { 282 - gcc = { abi = "elfv2"; } // stdenv.hostPlatform.gcc or {}; 325 + pkgsStatic = nixpkgsFun ({ 326 + overlays = [ (self': super': { 327 + pkgsStatic = super'; 328 + })] ++ overlays; 329 + crossSystem = { 330 + isStatic = true; 331 + config = lib.systems.parse.tripleFromSystem ( 332 + if stdenv.hostPlatform.isLinux 333 + then makeMuslParsedPlatform stdenv.hostPlatform.parsed 334 + else stdenv.hostPlatform.parsed 335 + ); 336 + gcc = lib.optionalAttrs (stdenv.hostPlatform.system == "powerpc64-linux") { abi = "elfv2"; } // 337 + stdenv.hostPlatform.gcc or {}; 338 + }; 283 339 }); 284 340 285 - pkgsExtraHardening = mkPkgs "pkgsExtraHardening" (_: { 341 + pkgsExtraHardening = nixpkgsFun { 286 342 overlays = [ 287 343 (self': super': { 344 + pkgsExtraHardening = super'; 288 345 stdenv = super'.withDefaultHardeningFlags ( 289 346 super'.stdenv.cc.defaultHardeningFlags ++ [ 290 347 "shadowstack" ··· 303 360 pcre-cpp = super'.pcre-cpp.override { enableJit = false; }; 304 361 pcre16 = super'.pcre16.override { enableJit = false; }; 305 362 }) 306 - ]; 307 - }); 308 - 309 - # Extend the package set with zero or more overlays. This preserves 310 - # preexisting overlays. Prefer to initialize with the right overlays 311 - # in one go when calling Nixpkgs, for performance and simplicity. 312 - appendOverlays = extraOverlays: 313 - if extraOverlays == [] 314 - then self 315 - else nixpkgsFun (prevArgs: { overlays = prevArgs.overlays ++ extraOverlays; }); 316 - 317 - # NOTE: each call to extend causes a full nixpkgs rebuild, adding ~130MB 318 - # of allocations. DO NOT USE THIS IN NIXPKGS. 319 - # 320 - # Extend the package set with a single overlay. This preserves 321 - # preexisting overlays. Prefer to initialize with the right overlays 322 - # in one go when calling Nixpkgs, for performance and simplicity. 323 - # Prefer appendOverlays if used repeatedly. 324 - extend = f: self.appendOverlays [f]; 363 + ] ++ overlays; 364 + }; 325 365 }; 326 366 327 367 # The complete chain of package set builders, applied from top to bottom.