···12configuration options.
13:::
140000000000000000000000015Apart from high-level options, it's possible to tweak a package in
16almost arbitrary ways, such as changing or disabling dependencies of a
17package. For instance, the Emacs package in Nixpkgs by default has a
···12configuration options.
13:::
1415+::: {.note}
16+Alternatively, many packages come with extensions one might add.
17+Examples include:
18+- [`passExtensions.pass-otp`](https://search.nixos.org/packages/query=passExtensions.pass-otp)
19+- [`python310Packages.requests`](https://search.nixos.org/packages/query=python310Packages.requests)
20+21+You can use them like this:
22+```nix
23+environment.systemPackages = with pkgs; [
24+ sl
25+ (pass.withExtensions (subpkgs: with subpkgs; [
26+ pass-audit
27+ pass-otp
28+ pass-genphrase
29+ ]))
30+ (python3.withPackages (subpkgs: with subpkgs; [
31+ requests
32+ ]))
33+ cowsay
34+];
35+```
36+:::
37+38Apart from high-level options, it's possible to tweak a package in
39almost arbitrary ways, such as changing or disabling dependencies of a
40package. For instance, the Emacs package in Nixpkgs by default has a
···35 ###### implementation
3637 config = lib.mkIf (cfg.nanorc != "" || cfg.syntaxHighlight) {
38+ environment.etc.nanorc.text = lib.concatStringsSep LF (
39+ ( lib.optionals cfg.syntaxHighlight [
40+ "# The line below is added because value of programs.nano.syntaxHighlight is set to true"
41+ ''include "${pkgs.nano}/share/nano/*.nanorc"''
42+ ""
43+ ])
44+ ++ ( lib.optionals (cfg.nanorc != "") [
45+ "# The lines below have been set from value of programs.nano.nanorc"
46+ cfg.nanorc
47+ ])
48+ );
49 };
5051}
+5
nixos/modules/services/monitoring/grafana.nix
···121 default = false;
122 description = lib.mdDoc "Allow users to edit datasources from the UI.";
123 };
00000124 secureJsonData = mkOption {
125 type = types.nullOr types.attrs;
126 default = null;
···121 default = false;
122 description = lib.mdDoc "Allow users to edit datasources from the UI.";
123 };
124+ jsonData = mkOption {
125+ type = types.nullOr types.attrs;
126+ default = null;
127+ description = lib.mdDoc "Extra data for datasource plugins.";
128+ };
129 secureJsonData = mkOption {
130 type = types.nullOr types.attrs;
131 default = null;
···32 # Allow doas to discover binaries in /run/current-system/sw/{s,}bin and
33 # /run/wrappers/bin
34 ./0001-add-NixOS-specific-dirs-to-safe-PATH.patch
35-36- # Standard environment supports "dontDisableStatic" knob, but has no
37- # equivalent for "--disable-shared", so I have to patch "configure"
38- # script instead.
39- ./disable-shared.patch
40 ];
0004142 postPatch = ''
43 sed -i '/\(chown\|chmod\)/d' GNUmakefile
···32 # Allow doas to discover binaries in /run/current-system/sw/{s,}bin and
33 # /run/wrappers/bin
34 ./0001-add-NixOS-specific-dirs-to-safe-PATH.patch
0000035 ];
36+37+ # ./configure script does not understand `--disable-shared`
38+ dontAddStaticConfigureFlags = true;
3940 postPatch = ''
41 sed -i '/\(chown\|chmod\)/d' GNUmakefile
-13
pkgs/tools/security/doas/disable-shared.patch
···1-Accept and ignore "--disable-shared" option passed by pkgsStatic.stdenv.
2-Without this patch, configure phase fails with "unknown option".
3-4---- a/configure 1970-01-01 00:00:00.000000000 -0500
5-+++ b/configure 1970-01-01 00:00:00.000000000 -0500
6-@@ -46,6 +46,7 @@
7- opt=${x%%=*}
8- var=${x#*=}
9- case "$opt" in
10-+ --disable-shared) : ;;
11- --prefix) PREFIX=$var ;;
12- --exec-prefix) EPREFIX=$var ;;
13- --bindir) BINDIR=$var ;;
···0000000000000
+3-3
pkgs/tools/security/rsign2/default.nix
···56rustPlatform.buildRustPackage rec {
7 pname = "rsign2";
8- version = "0.6.2";
910 src = fetchCrate {
11 inherit pname version;
12- hash = "sha256-Ono7cKXccYMmkrlsJ+Z85w8z0fEduuEQhRlHQQk0vzU=";
13 };
1415- cargoHash = "sha256-Yuf4iTWGQp/1ZUVqaR0tKfFxKJ9JEmMLq1LL7gwf6w0=";
1617 meta = with lib; {
18 description = "A command-line tool to sign files and verify signatures";
···56rustPlatform.buildRustPackage rec {
7 pname = "rsign2";
8+ version = "0.6.3";
910 src = fetchCrate {
11 inherit pname version;
12+ hash = "sha256-bJeM1HTzmC8QZ488PpqQ0qqdFg1/rjPWuTtqo1GXyHM=";
13 };
1415+ cargoHash = "sha256-xqNFJFNV9mIVxzyQvhv5QwHVcXLuH76VYFAsgp5hW+w=";
1617 meta = with lib; {
18 description = "A command-line tool to sign files and verify signatures";
···216 pymssql = throw "pymssql has been abandoned upstream."; # added 2020-05-04
217 PyMVGLive = pymvglive; # added 2023-02-19
218 pyramid_hawkauth = throw "pyramid_hawkauth has been removed because it is no longer maintained"; # added 2023-02-2
0219 pyreadability = readability-lxml; # added 2022-05-24
220 pyroute2-core = throw "pyroute2 migrated back to a single package scheme in version 0.7.1"; # added 2022-07-16
221 pyroute2-ethtool = throw "pyroute2 migrated back to a single package scheme in version 0.7.1"; # added 2022-07-16
···216 pymssql = throw "pymssql has been abandoned upstream."; # added 2020-05-04
217 PyMVGLive = pymvglive; # added 2023-02-19
218 pyramid_hawkauth = throw "pyramid_hawkauth has been removed because it is no longer maintained"; # added 2023-02-2
219+ pyramid_jinja2 = pyramid-jinja2; # added 2023-06-06
220 pyreadability = readability-lxml; # added 2022-05-24
221 pyroute2-core = throw "pyroute2 migrated back to a single package scheme in version 0.7.1"; # added 2022-07-16
222 pyroute2-ethtool = throw "pyroute2 migrated back to a single package scheme in version 0.7.1"; # added 2022-07-16