···1212configuration options.
1313:::
14141515+::: {.note}
1616+Alternatively, many packages come with extensions one might add.
1717+Examples include:
1818+- [`passExtensions.pass-otp`](https://search.nixos.org/packages/query=passExtensions.pass-otp)
1919+- [`python310Packages.requests`](https://search.nixos.org/packages/query=python310Packages.requests)
2020+2121+You can use them like this:
2222+```nix
2323+environment.systemPackages = with pkgs; [
2424+ sl
2525+ (pass.withExtensions (subpkgs: with subpkgs; [
2626+ pass-audit
2727+ pass-otp
2828+ pass-genphrase
2929+ ]))
3030+ (python3.withPackages (subpkgs: with subpkgs; [
3131+ requests
3232+ ]))
3333+ cowsay
3434+];
3535+```
3636+:::
3737+1538Apart from high-level options, it's possible to tweak a package in
1639almost arbitrary ways, such as changing or disabling dependencies of a
1740package. For instance, the Emacs package in Nixpkgs by default has a
+11-2
nixos/modules/programs/nano.nix
···3535 ###### implementation
36363737 config = lib.mkIf (cfg.nanorc != "" || cfg.syntaxHighlight) {
3838- environment.etc.nanorc.text = lib.concatStrings [ cfg.nanorc
3939- (lib.optionalString cfg.syntaxHighlight ''${LF}include "${pkgs.nano}/share/nano/*.nanorc"'') ];
3838+ environment.etc.nanorc.text = lib.concatStringsSep LF (
3939+ ( lib.optionals cfg.syntaxHighlight [
4040+ "# The line below is added because value of programs.nano.syntaxHighlight is set to true"
4141+ ''include "${pkgs.nano}/share/nano/*.nanorc"''
4242+ ""
4343+ ])
4444+ ++ ( lib.optionals (cfg.nanorc != "") [
4545+ "# The lines below have been set from value of programs.nano.nanorc"
4646+ cfg.nanorc
4747+ ])
4848+ );
4049 };
41504251}
+5
nixos/modules/services/monitoring/grafana.nix
···121121 default = false;
122122 description = lib.mdDoc "Allow users to edit datasources from the UI.";
123123 };
124124+ jsonData = mkOption {
125125+ type = types.nullOr types.attrs;
126126+ default = null;
127127+ description = lib.mdDoc "Extra data for datasource plugins.";
128128+ };
124129 secureJsonData = mkOption {
125130 type = types.nullOr types.attrs;
126131 default = null;
···3232 # Allow doas to discover binaries in /run/current-system/sw/{s,}bin and
3333 # /run/wrappers/bin
3434 ./0001-add-NixOS-specific-dirs-to-safe-PATH.patch
3535-3636- # Standard environment supports "dontDisableStatic" knob, but has no
3737- # equivalent for "--disable-shared", so I have to patch "configure"
3838- # script instead.
3939- ./disable-shared.patch
4035 ];
3636+3737+ # ./configure script does not understand `--disable-shared`
3838+ dontAddStaticConfigureFlags = true;
41394240 postPatch = ''
4341 sed -i '/\(chown\|chmod\)/d' GNUmakefile
-13
pkgs/tools/security/doas/disable-shared.patch
···11-Accept and ignore "--disable-shared" option passed by pkgsStatic.stdenv.
22-Without this patch, configure phase fails with "unknown option".
33-44---- a/configure 1970-01-01 00:00:00.000000000 -0500
55-+++ b/configure 1970-01-01 00:00:00.000000000 -0500
66-@@ -46,6 +46,7 @@
77- opt=${x%%=*}
88- var=${x#*=}
99- case "$opt" in
1010-+ --disable-shared) : ;;
1111- --prefix) PREFIX=$var ;;
1212- --exec-prefix) EPREFIX=$var ;;
1313- --bindir) BINDIR=$var ;;
+3-3
pkgs/tools/security/rsign2/default.nix
···5566rustPlatform.buildRustPackage rec {
77 pname = "rsign2";
88- version = "0.6.2";
88+ version = "0.6.3";
991010 src = fetchCrate {
1111 inherit pname version;
1212- hash = "sha256-Ono7cKXccYMmkrlsJ+Z85w8z0fEduuEQhRlHQQk0vzU=";
1212+ hash = "sha256-bJeM1HTzmC8QZ488PpqQ0qqdFg1/rjPWuTtqo1GXyHM=";
1313 };
14141515- cargoHash = "sha256-Yuf4iTWGQp/1ZUVqaR0tKfFxKJ9JEmMLq1LL7gwf6w0=";
1515+ cargoHash = "sha256-xqNFJFNV9mIVxzyQvhv5QwHVcXLuH76VYFAsgp5hW+w=";
16161717 meta = with lib; {
1818 description = "A command-line tool to sign files and verify signatures";
···216216 pymssql = throw "pymssql has been abandoned upstream."; # added 2020-05-04
217217 PyMVGLive = pymvglive; # added 2023-02-19
218218 pyramid_hawkauth = throw "pyramid_hawkauth has been removed because it is no longer maintained"; # added 2023-02-2
219219+ pyramid_jinja2 = pyramid-jinja2; # added 2023-06-06
219220 pyreadability = readability-lxml; # added 2022-05-24
220221 pyroute2-core = throw "pyroute2 migrated back to a single package scheme in version 0.7.1"; # added 2022-07-16
221222 pyroute2-ethtool = throw "pyroute2 migrated back to a single package scheme in version 0.7.1"; # added 2022-07-16