Merge pull request #123229 from superherointj/nixpkgs-toplevel-allpackages-editorformat

top-level: refactor of all-packages to comply w/ editorconfig-checker

authored by

Graham Christensen and committed by
GitHub
9b92a817 8b9dc097

+146 -148
+146 -148
pkgs/top-level/all-packages.nix
··· 457 458 # `fetchurl' downloads a file from the network. 459 fetchurl = if stdenv.buildPlatform != stdenv.hostPlatform 460 - then buildPackages.fetchurl # No need to do special overrides twice, 461 - else makeOverridable (import ../build-support/fetchurl) { 462 - inherit lib stdenvNoCC buildPackages; 463 - inherit cacert; 464 - curl = buildPackages.curlMinimal.override (old: rec { 465 - # break dependency cycles 466 - fetchurl = stdenv.fetchurlBoot; 467 - zlib = buildPackages.zlib.override { fetchurl = stdenv.fetchurlBoot; }; 468 - pkg-config = buildPackages.pkg-config.override (old: { 469 - pkg-config = old.pkg-config.override { 470 - fetchurl = stdenv.fetchurlBoot; 471 - }; 472 - }); 473 - perl = buildPackages.perl.override { fetchurl = stdenv.fetchurlBoot; }; 474 - openssl = buildPackages.openssl.override { 475 fetchurl = stdenv.fetchurlBoot; 476 - buildPackages = { 477 - coreutils = buildPackages.coreutils.override { 478 fetchurl = stdenv.fetchurlBoot; 479 inherit perl; 480 - xz = buildPackages.xz.override { fetchurl = stdenv.fetchurlBoot; }; 481 - gmp = null; 482 - aclSupport = false; 483 - attrSupport = false; 484 }; 485 inherit perl; 486 }; 487 - inherit perl; 488 - }; 489 - libssh2 = buildPackages.libssh2.override { 490 - fetchurl = stdenv.fetchurlBoot; 491 - inherit zlib openssl; 492 - }; 493 - # On darwin, libkrb5 needs bootstrap_cmds which would require 494 - # converting many packages to fetchurl_boot to avoid evaluation cycles. 495 - # So turn gssSupport off there, and on Windows. 496 - # On other platforms, keep the previous value. 497 - gssSupport = 498 - if stdenv.isDarwin || stdenv.hostPlatform.isWindows 499 - then false 500 - else old.gssSupport or true; # `? true` is the default 501 - libkrb5 = buildPackages.libkrb5.override { 502 - fetchurl = stdenv.fetchurlBoot; 503 - inherit pkg-config perl openssl; 504 - keyutils = buildPackages.keyutils.override { fetchurl = stdenv.fetchurlBoot; }; 505 - }; 506 - nghttp2 = buildPackages.nghttp2.override { 507 - fetchurl = stdenv.fetchurlBoot; 508 - inherit zlib pkg-config openssl; 509 - c-ares = buildPackages.c-ares.override { fetchurl = stdenv.fetchurlBoot; }; 510 - libev = buildPackages.libev.override { fetchurl = stdenv.fetchurlBoot; }; 511 - }; 512 - }); 513 - }; 514 515 fetchRepoProject = callPackage ../build-support/fetchrepoproject { }; 516 ··· 1470 grc = python3Packages.callPackage ../tools/misc/grc { }; 1471 1472 green-pdfviewer = callPackage ../applications/misc/green-pdfviewer { 1473 - SDL = SDL_sixel; 1474 }; 1475 1476 gremlin-console = callPackage ../applications/misc/gremlin-console { ··· 4233 wallutils = callPackage ../tools/graphics/wallutils { }; 4234 4235 wrangler = callPackage ../development/tools/wrangler { 4236 - inherit (darwin.apple_sdk.frameworks) CoreFoundation CoreServices Security; 4237 }; 4238 4239 wsl-open = callPackage ../tools/misc/wsl-open { }; ··· 5145 5146 gnu-pw-mgr = callPackage ../tools/security/gnu-pw-mgr { }; 5147 5148 - gnused = if !stdenv.hostPlatform.isWindows then 5149 - callPackage ../tools/text/gnused { } # broken on Windows 5150 - else 5151 - gnused_422; 5152 # This is an easy work-around for [:space:] problems. 5153 gnused_422 = callPackage ../tools/text/gnused/422.nix { }; 5154 ··· 10451 10452 crossLibcStdenv = overrideCC stdenv 10453 (if stdenv.hostPlatform.useLLVM or false 10454 - then buildPackages.llvmPackages_8.lldClangNoLibc 10455 - else buildPackages.gccCrossStageStatic); 10456 10457 # The GCC used to build libc for the target platform. Normal gccs will be 10458 # built with, and use, that cross-compiled libc. ··· 11274 mint = callPackage ../development/compilers/mint { }; 11275 11276 mitscheme = callPackage ../development/compilers/mit-scheme { 11277 - texLive = texlive.combine { inherit (texlive) scheme-small; }; 11278 - texinfo = texinfo5; 11279 - xlibsWrapper = null; 11280 }; 11281 11282 mitschemeX11 = mitscheme.override { 11283 - texLive = texlive.combine { inherit (texlive) scheme-small; }; 11284 - texinfo = texinfo5; 11285 - enableX11 = true; 11286 }; 11287 11288 miranda = callPackage ../development/compilers/miranda {}; ··· 12916 # }; 12917 # 12918 distccWrapper = makeOverridable ({ extraConfig ? "" }: 12919 - wrapCC (distcc.links extraConfig)) {}; 12920 distccStdenv = lowPrio (overrideCC stdenv buildPackages.distccWrapper); 12921 12922 distccMasquerade = if stdenv.isDarwin ··· 16062 libiconv = 16063 if lib.elem stdenv.hostPlatform.libc ["glibc" "musl" "wasilibc"] 16064 then glibcIconv (if stdenv.hostPlatform != stdenv.buildPlatform 16065 - then libcCross 16066 - else stdenv.cc.libc) 16067 else if stdenv.hostPlatform.isDarwin 16068 then darwin.libiconv 16069 else libiconvReal; ··· 17520 17521 s2geometry = callPackage ../development/libraries/s2geometry { }; 17522 17523 - /* This package references ghc844, which we no longer have. Unfortunately, I 17524 - have been unable to mark it as "broken" in a way that the ofBorg bot 17525 - recognizes. Since I don't want to merge code into master that generates 17526 - evaluation errors, I have no other idea but to comment it out entirely. 17527 17528 sad = callPackage ../applications/science/logic/sad { }; 17529 - */ 17530 17531 safefile = callPackage ../development/libraries/safefile {}; 17532 ··· 20253 ]; 20254 }; 20255 20256 - /* Linux kernel modules are inherently tied to a specific kernel. So 20257 - rather than provide specific instances of those packages for a 20258 - specific kernel, we have a function that builds those packages 20259 - for a specific kernel. This function can then be called for 20260 - whatever kernel you're using. */ 20261 20262 linuxPackagesFor = kernel_: lib.makeExtensible (self: with self; { 20263 callPackage = newScope self; ··· 20397 20398 mxu11x0 = callPackage ../os-specific/linux/mxu11x0 { }; 20399 20400 - /* compiles but has to be integrated into the kernel somehow 20401 - Let's have it uncommented and finish it.. 20402 - */ 20403 ndiswrapper = callPackage ../os-specific/linux/ndiswrapper { }; 20404 20405 netatop = callPackage ../os-specific/linux/netatop { }; ··· 20458 zenpower = callPackage ../os-specific/linux/zenpower { }; 20459 20460 inherit (callPackages ../os-specific/linux/zfs { 20461 - configFile = "kernel"; 20462 - inherit kernel; 20463 - }) zfsStable zfsUnstable; 20464 20465 - zfs = zfsStable; 20466 - 20467 - can-isotp = callPackage ../os-specific/linux/can-isotp { }; 20468 }); 20469 20470 # The current default kernel / kernel modules. ··· 20709 inherit (darwin.apple_sdk.frameworks) AppKit Security; 20710 }; 20711 20712 - nettools = if stdenv.isLinux then callPackage ../os-specific/linux/net-tools { } 20713 - else unixtools.nettools; 20714 20715 nettools_mptcp = callPackage ../os-specific/linux/net-tools/mptcp.nix { }; 20716 ··· 20909 20910 prayer = callPackage ../servers/prayer { }; 20911 20912 - procps = if stdenv.isLinux then callPackage ../os-specific/linux/procps-ng { } 20913 - else unixtools.procps; 20914 20915 procdump = callPackage ../os-specific/linux/procdump { }; 20916 ··· 22060 ucs-fonts = callPackage ../data/fonts/ucs-fonts 22061 { inherit (buildPackages.xorg) fonttosfnt mkfontscale; }; 22062 22063 - 22064 ultimate-oldschool-pc-font-pack = callPackage ../data/fonts/ultimate-oldschool-pc-font-pack { }; 22065 22066 ultralist = callPackage ../applications/misc/ultralist { }; ··· 22068 undefined-medium = callPackage ../data/fonts/undefined-medium { }; 22069 22070 uni-vga = callPackage ../data/fonts/uni-vga 22071 - { inherit (buildPackages.xorg) fonttosfnt mkfontscale; }; 22072 22073 unicode-character-database = callPackage ../data/misc/unicode-character-database { }; 22074 ··· 22077 unihan-database = callPackage ../data/misc/unihan-database { }; 22078 22079 unifont = callPackage ../data/fonts/unifont 22080 - { inherit (buildPackages.xorg) fonttosfnt mkfontscale; }; 22081 22082 unifont_upper = callPackage ../data/fonts/unifont_upper { }; 22083 ··· 23108 flwrap = callPackage ../applications/radio/flwrap { }; 23109 23110 fluidsynth = callPackage ../applications/audio/fluidsynth { 23111 - inherit (darwin.apple_sdk.frameworks) AudioUnit CoreAudio CoreMIDI CoreServices; 23112 }; 23113 fluidsynth_1 = fluidsynth.override { version = "1"; }; 23114 ··· 25105 25106 plank = callPackage ../applications/misc/plank { }; 25107 25108 - playonlinux = callPackage ../applications/misc/playonlinux { 25109 - stdenv = stdenv_32bit; 25110 - }; 25111 25112 pleroma-bot = python3Packages.callPackage ../development/python-modules/pleroma-bot { }; 25113 ··· 27510 zgrviewer = callPackage ../applications/graphics/zgrviewer { }; 27511 27512 zgv = callPackage ../applications/graphics/zgv { 27513 - # Enable the below line for terminal display. Note 27514 - # that it requires sixel graphics compatible terminals like mlterm 27515 - # or xterm -ti 340 27516 - SDL = SDL_sixel; 27517 }; 27518 27519 zim = callPackage ../applications/office/zim { }; ··· 29444 elan = callPackage ../applications/science/logic/elan {}; 29445 mathlibtools = with python3Packages; toPythonApplication mathlibtools; 29446 29447 - leo2 = callPackage ../applications/science/logic/leo2 { 29448 - ocaml = ocaml-ng.ocamlPackages_4_01_0.ocaml;}; 29449 29450 leo3-bin = callPackage ../applications/science/logic/leo3/binary.nix {}; 29451 ··· 30241 30242 nixops-dns = callPackage ../tools/package-management/nixops/nixops-dns.nix { }; 30243 30244 - /* Evaluate a NixOS configuration using this evaluation of Nixpkgs. 30245 30246 - With this function you can write, for example, a package that 30247 - depends on a custom virtual machine image. 30248 30249 - Parameter: A module, path or list of those that represent the 30250 configuration of the NixOS system to be constructed. 30251 30252 - Result: An attribute set containing packages produced by this 30253 - evaluation of NixOS, such as toplevel, kernel and 30254 - initialRamdisk. 30255 - The result can be extended in the modules by defining 30256 - extra attributes in system.build. 30257 - Alternatively, you may use the result's config and 30258 - options attributes to query any option. 30259 30260 - Example: 30261 30262 - let 30263 - myOS = pkgs.nixos ({ lib, pkgs, config, ... }: { 30264 30265 - config.services.nginx = { 30266 - enable = true; 30267 - # ... 30268 - }; 30269 30270 - # Use config.system.build to exports relevant parts of a 30271 - # configuration. The runner attribute should not be 30272 - # considered a fully general replacement for systemd 30273 - # functionality. 30274 - config.system.build.run-nginx = config.systemd.services.nginx.runner; 30275 - }); 30276 - in 30277 - myOS.run-nginx 30278 30279 - Unlike in plain NixOS, the nixpkgs.config and 30280 - nixpkgs.system options will be ignored by default. Instead, 30281 - nixpkgs.pkgs will have the default value of pkgs as it was 30282 - constructed right after invoking the nixpkgs function (e.g. the 30283 - value of import <nixpkgs> { overlays = [./my-overlay.nix]; } 30284 - but not the value of (import <nixpkgs> {} // { extra = ...; }). 30285 30286 - If you do want to use the config.nixpkgs options, you are 30287 - probably better off by calling nixos/lib/eval-config.nix 30288 - directly, even though it is possible to set config.nixpkgs.pkgs. 30289 30290 - For more information about writing NixOS modules, see 30291 - https://nixos.org/nixos/manual/index.html#sec-writing-modules 30292 30293 - Note that you will need to have called Nixpkgs with the system 30294 - parameter set to the right value for your deployment target. 30295 */ 30296 nixos = 30297 configuration: ··· 30359 test: 30360 let 30361 loadedTest = if builtins.typeOf test == "path" 30362 - then import test 30363 - else test; 30364 calledTest = if pkgs.lib.isFunction loadedTest 30365 - then callPackage loadedTest {} 30366 - else loadedTest; 30367 in 30368 nixosTesting.makeTest calledTest; 30369 ··· 31023 }; 31024 31025 xsw = callPackage ../applications/misc/xsw { 31026 - # Enable the next line to use this in terminal. 31027 - # Note that it requires sixel capable terminals such as mlterm 31028 - # or xterm -ti 340 31029 - SDL = SDL_sixel; 31030 }; 31031 31032 xteddy = callPackage ../applications/misc/xteddy { };
··· 457 458 # `fetchurl' downloads a file from the network. 459 fetchurl = if stdenv.buildPlatform != stdenv.hostPlatform 460 + then buildPackages.fetchurl # No need to do special overrides twice, 461 + else makeOverridable (import ../build-support/fetchurl) { 462 + inherit lib stdenvNoCC buildPackages; 463 + inherit cacert; 464 + curl = buildPackages.curlMinimal.override (old: rec { 465 + # break dependency cycles 466 fetchurl = stdenv.fetchurlBoot; 467 + zlib = buildPackages.zlib.override { fetchurl = stdenv.fetchurlBoot; }; 468 + pkg-config = buildPackages.pkg-config.override (old: { 469 + pkg-config = old.pkg-config.override { 470 fetchurl = stdenv.fetchurlBoot; 471 + }; 472 + }); 473 + perl = buildPackages.perl.override { fetchurl = stdenv.fetchurlBoot; }; 474 + openssl = buildPackages.openssl.override { 475 + fetchurl = stdenv.fetchurlBoot; 476 + buildPackages = { 477 + coreutils = buildPackages.coreutils.override { 478 + fetchurl = stdenv.fetchurlBoot; 479 + inherit perl; 480 + xz = buildPackages.xz.override { fetchurl = stdenv.fetchurlBoot; }; 481 + gmp = null; 482 + aclSupport = false; 483 + attrSupport = false; 484 + }; 485 inherit perl; 486 }; 487 inherit perl; 488 }; 489 + libssh2 = buildPackages.libssh2.override { 490 + fetchurl = stdenv.fetchurlBoot; 491 + inherit zlib openssl; 492 + }; 493 + # On darwin, libkrb5 needs bootstrap_cmds which would require 494 + # converting many packages to fetchurl_boot to avoid evaluation cycles. 495 + # So turn gssSupport off there, and on Windows. 496 + # On other platforms, keep the previous value. 497 + gssSupport = 498 + if stdenv.isDarwin || stdenv.hostPlatform.isWindows 499 + then false 500 + else old.gssSupport or true; # `? true` is the default 501 + libkrb5 = buildPackages.libkrb5.override { 502 + fetchurl = stdenv.fetchurlBoot; 503 + inherit pkg-config perl openssl; 504 + keyutils = buildPackages.keyutils.override { fetchurl = stdenv.fetchurlBoot; }; 505 + }; 506 + nghttp2 = buildPackages.nghttp2.override { 507 + fetchurl = stdenv.fetchurlBoot; 508 + inherit zlib pkg-config openssl; 509 + c-ares = buildPackages.c-ares.override { fetchurl = stdenv.fetchurlBoot; }; 510 + libev = buildPackages.libev.override { fetchurl = stdenv.fetchurlBoot; }; 511 + }; 512 + }); 513 + }; 514 515 fetchRepoProject = callPackage ../build-support/fetchrepoproject { }; 516 ··· 1470 grc = python3Packages.callPackage ../tools/misc/grc { }; 1471 1472 green-pdfviewer = callPackage ../applications/misc/green-pdfviewer { 1473 + SDL = SDL_sixel; 1474 }; 1475 1476 gremlin-console = callPackage ../applications/misc/gremlin-console { ··· 4233 wallutils = callPackage ../tools/graphics/wallutils { }; 4234 4235 wrangler = callPackage ../development/tools/wrangler { 4236 + inherit (darwin.apple_sdk.frameworks) CoreFoundation CoreServices Security; 4237 }; 4238 4239 wsl-open = callPackage ../tools/misc/wsl-open { }; ··· 5145 5146 gnu-pw-mgr = callPackage ../tools/security/gnu-pw-mgr { }; 5147 5148 + gnused = if !stdenv.hostPlatform.isWindows 5149 + then callPackage ../tools/text/gnused { } # broken on Windows 5150 + else gnused_422; 5151 # This is an easy work-around for [:space:] problems. 5152 gnused_422 = callPackage ../tools/text/gnused/422.nix { }; 5153 ··· 10450 10451 crossLibcStdenv = overrideCC stdenv 10452 (if stdenv.hostPlatform.useLLVM or false 10453 + then buildPackages.llvmPackages_8.lldClangNoLibc 10454 + else buildPackages.gccCrossStageStatic); 10455 10456 # The GCC used to build libc for the target platform. Normal gccs will be 10457 # built with, and use, that cross-compiled libc. ··· 11273 mint = callPackage ../development/compilers/mint { }; 11274 11275 mitscheme = callPackage ../development/compilers/mit-scheme { 11276 + texLive = texlive.combine { inherit (texlive) scheme-small; }; 11277 + texinfo = texinfo5; 11278 + xlibsWrapper = null; 11279 }; 11280 11281 mitschemeX11 = mitscheme.override { 11282 + texLive = texlive.combine { inherit (texlive) scheme-small; }; 11283 + texinfo = texinfo5; 11284 + enableX11 = true; 11285 }; 11286 11287 miranda = callPackage ../development/compilers/miranda {}; ··· 12915 # }; 12916 # 12917 distccWrapper = makeOverridable ({ extraConfig ? "" }: 12918 + wrapCC (distcc.links extraConfig)) {}; 12919 distccStdenv = lowPrio (overrideCC stdenv buildPackages.distccWrapper); 12920 12921 distccMasquerade = if stdenv.isDarwin ··· 16061 libiconv = 16062 if lib.elem stdenv.hostPlatform.libc ["glibc" "musl" "wasilibc"] 16063 then glibcIconv (if stdenv.hostPlatform != stdenv.buildPlatform 16064 + then libcCross 16065 + else stdenv.cc.libc) 16066 else if stdenv.hostPlatform.isDarwin 16067 then darwin.libiconv 16068 else libiconvReal; ··· 17519 17520 s2geometry = callPackage ../development/libraries/s2geometry { }; 17521 17522 + /* This package references ghc844, which we no longer have. Unfortunately, I 17523 + have been unable to mark it as "broken" in a way that the ofBorg bot 17524 + recognizes. Since I don't want to merge code into master that generates 17525 + evaluation errors, I have no other idea but to comment it out entirely. 17526 17527 sad = callPackage ../applications/science/logic/sad { }; 17528 + */ 17529 17530 safefile = callPackage ../development/libraries/safefile {}; 17531 ··· 20252 ]; 20253 }; 20254 20255 + /* Linux kernel modules are inherently tied to a specific kernel. So 20256 + rather than provide specific instances of those packages for a 20257 + specific kernel, we have a function that builds those packages 20258 + for a specific kernel. This function can then be called for 20259 + whatever kernel you're using. */ 20260 20261 linuxPackagesFor = kernel_: lib.makeExtensible (self: with self; { 20262 callPackage = newScope self; ··· 20396 20397 mxu11x0 = callPackage ../os-specific/linux/mxu11x0 { }; 20398 20399 + # compiles but has to be integrated into the kernel somehow 20400 + # Let's have it uncommented and finish it.. 20401 ndiswrapper = callPackage ../os-specific/linux/ndiswrapper { }; 20402 20403 netatop = callPackage ../os-specific/linux/netatop { }; ··· 20456 zenpower = callPackage ../os-specific/linux/zenpower { }; 20457 20458 inherit (callPackages ../os-specific/linux/zfs { 20459 + configFile = "kernel"; 20460 + inherit kernel; 20461 + }) zfsStable zfsUnstable; 20462 + zfs = zfsStable; 20463 20464 + can-isotp = callPackage ../os-specific/linux/can-isotp { }; 20465 }); 20466 20467 # The current default kernel / kernel modules. ··· 20706 inherit (darwin.apple_sdk.frameworks) AppKit Security; 20707 }; 20708 20709 + nettools = if stdenv.isLinux 20710 + then callPackage ../os-specific/linux/net-tools { } 20711 + else unixtools.nettools; 20712 20713 nettools_mptcp = callPackage ../os-specific/linux/net-tools/mptcp.nix { }; 20714 ··· 20907 20908 prayer = callPackage ../servers/prayer { }; 20909 20910 + procps = if stdenv.isLinux 20911 + then callPackage ../os-specific/linux/procps-ng { } 20912 + else unixtools.procps; 20913 20914 procdump = callPackage ../os-specific/linux/procdump { }; 20915 ··· 22059 ucs-fonts = callPackage ../data/fonts/ucs-fonts 22060 { inherit (buildPackages.xorg) fonttosfnt mkfontscale; }; 22061 22062 ultimate-oldschool-pc-font-pack = callPackage ../data/fonts/ultimate-oldschool-pc-font-pack { }; 22063 22064 ultralist = callPackage ../applications/misc/ultralist { }; ··· 22066 undefined-medium = callPackage ../data/fonts/undefined-medium { }; 22067 22068 uni-vga = callPackage ../data/fonts/uni-vga 22069 + { inherit (buildPackages.xorg) fonttosfnt mkfontscale; }; 22070 22071 unicode-character-database = callPackage ../data/misc/unicode-character-database { }; 22072 ··· 22075 unihan-database = callPackage ../data/misc/unihan-database { }; 22076 22077 unifont = callPackage ../data/fonts/unifont 22078 + { inherit (buildPackages.xorg) fonttosfnt mkfontscale; }; 22079 22080 unifont_upper = callPackage ../data/fonts/unifont_upper { }; 22081 ··· 23106 flwrap = callPackage ../applications/radio/flwrap { }; 23107 23108 fluidsynth = callPackage ../applications/audio/fluidsynth { 23109 + inherit (darwin.apple_sdk.frameworks) AudioUnit CoreAudio CoreMIDI CoreServices; 23110 }; 23111 fluidsynth_1 = fluidsynth.override { version = "1"; }; 23112 ··· 25103 25104 plank = callPackage ../applications/misc/plank { }; 25105 25106 + playonlinux = callPackage ../applications/misc/playonlinux 25107 + { stdenv = stdenv_32bit; }; 25108 25109 pleroma-bot = python3Packages.callPackage ../development/python-modules/pleroma-bot { }; 25110 ··· 27507 zgrviewer = callPackage ../applications/graphics/zgrviewer { }; 27508 27509 zgv = callPackage ../applications/graphics/zgv { 27510 + # Enable the below line for terminal display. Note 27511 + # that it requires sixel graphics compatible terminals like mlterm 27512 + # or xterm -ti 340 27513 + SDL = SDL_sixel; 27514 }; 27515 27516 zim = callPackage ../applications/office/zim { }; ··· 29441 elan = callPackage ../applications/science/logic/elan {}; 29442 mathlibtools = with python3Packages; toPythonApplication mathlibtools; 29443 29444 + leo2 = callPackage ../applications/science/logic/leo2 29445 + { ocaml = ocaml-ng.ocamlPackages_4_01_0.ocaml; }; 29446 29447 leo3-bin = callPackage ../applications/science/logic/leo3/binary.nix {}; 29448 ··· 30238 30239 nixops-dns = callPackage ../tools/package-management/nixops/nixops-dns.nix { }; 30240 30241 + /* 30242 + Evaluate a NixOS configuration using this evaluation of Nixpkgs. 30243 30244 + With this function you can write, for example, a package that 30245 + depends on a custom virtual machine image. 30246 30247 + Parameter: A module, path or list of those that represent the 30248 configuration of the NixOS system to be constructed. 30249 30250 + Result: An attribute set containing packages produced by this 30251 + evaluation of NixOS, such as toplevel, kernel and 30252 + initialRamdisk. 30253 + The result can be extended in the modules by defining 30254 + extra attributes in system.build. 30255 + Alternatively, you may use the result's config and 30256 + options attributes to query any option. 30257 30258 + Example: 30259 30260 + let 30261 + myOS = pkgs.nixos ({ lib, pkgs, config, ... }: { 30262 30263 + config.services.nginx = { 30264 + enable = true; 30265 + # ... 30266 + }; 30267 30268 + # Use config.system.build to exports relevant parts of a 30269 + # configuration. The runner attribute should not be 30270 + # considered a fully general replacement for systemd 30271 + # functionality. 30272 + config.system.build.run-nginx = config.systemd.services.nginx.runner; 30273 + }); 30274 + in 30275 + myOS.run-nginx 30276 30277 + Unlike in plain NixOS, the nixpkgs.config and 30278 + nixpkgs.system options will be ignored by default. Instead, 30279 + nixpkgs.pkgs will have the default value of pkgs as it was 30280 + constructed right after invoking the nixpkgs function (e.g. the 30281 + value of import <nixpkgs> { overlays = [./my-overlay.nix]; } 30282 + but not the value of (import <nixpkgs> {} // { extra = ...; }). 30283 30284 + If you do want to use the config.nixpkgs options, you are 30285 + probably better off by calling nixos/lib/eval-config.nix 30286 + directly, even though it is possible to set config.nixpkgs.pkgs. 30287 30288 + For more information about writing NixOS modules, see 30289 + https://nixos.org/nixos/manual/index.html#sec-writing-modules 30290 30291 + Note that you will need to have called Nixpkgs with the system 30292 + parameter set to the right value for your deployment target. 30293 */ 30294 nixos = 30295 configuration: ··· 30357 test: 30358 let 30359 loadedTest = if builtins.typeOf test == "path" 30360 + then import test 30361 + else test; 30362 calledTest = if pkgs.lib.isFunction loadedTest 30363 + then callPackage loadedTest {} 30364 + else loadedTest; 30365 in 30366 nixosTesting.makeTest calledTest; 30367 ··· 31021 }; 31022 31023 xsw = callPackage ../applications/misc/xsw { 31024 + # Enable the next line to use this in terminal. 31025 + # Note that it requires sixel capable terminals such as mlterm 31026 + # or xterm -ti 340 31027 + SDL = SDL_sixel; 31028 }; 31029 31030 xteddy = callPackage ../applications/misc/xteddy { };