···1112In the following is an example expression using `buildGoModule`, the following arguments are of special significance to the function:
1314-- `vendorSha256`: is the hash of the output of the intermediate fetcher derivation. `vendorSha256` can also take `null` as an input. When `null` is used as a value, rather than fetching the dependencies and vendoring them, we use the vendoring included within the source repo. If you'd like to not have to update this field on dependency changes, run `go mod vendor` in your source repo and set `vendorSha256 = null;`
15-- `proxyVendor`: Fetches (go mod download) and proxies the vendor directory. This is useful if your code depends on c code and go mod tidy does not include the needed sources to build or if any dependency has case-insensitive conflicts which will produce platform dependant `vendorSha256` checksums.
1617```nix
18pet = buildGoModule rec {
···26 sha256 = "0m2fzpqxk7hrbxsgqplkg7h2p7gv6s1miymv3gvw0cz039skag0s";
27 };
2829- vendorSha256 = "1879j77k96684wi554rkjxydrj8g3hpp0kvxz03sd8dmwr3lh83j";
3031 meta = with lib; {
32 description = "Simple command-line snippet manager, written in Go";
···1112In the following is an example expression using `buildGoModule`, the following arguments are of special significance to the function:
1314+- `vendorHash`: is the hash of the output of the intermediate fetcher derivation. `vendorHash` can also take `null` as an input. When `null` is used as a value, rather than fetching the dependencies and vendoring them, we use the vendoring included within the source repo. If you'd like to not have to update this field on dependency changes, run `go mod vendor` in your source repo and set `vendorHash = null;`
15+- `proxyVendor`: Fetches (go mod download) and proxies the vendor directory. This is useful if your code depends on c code and go mod tidy does not include the needed sources to build or if any dependency has case-insensitive conflicts which will produce platform dependant `vendorHash` checksums.
1617```nix
18pet = buildGoModule rec {
···26 sha256 = "0m2fzpqxk7hrbxsgqplkg7h2p7gv6s1miymv3gvw0cz039skag0s";
27 };
2829+ vendorHash = "sha256-ciBIR+a1oaYH+H1PcC8cD8ncfJczk1IiJ8iYNM+R6aA=";
3031 meta = with lib; {
32 description = "Simple command-line snippet manager, written in Go";
···273 </listitem>
274 <listitem>
275 <para>
00000000276 The <literal>services.graphite.api</literal> and
277 <literal>services.graphite.beacon</literal> NixOS options, and
278 the <literal>python3.pkgs.graphite_api</literal>,
···273 </listitem>
274 <listitem>
275 <para>
276+ xow package removed along with the
277+ <literal>hardware.xow</literal> module, due to the project
278+ being deprecated in favor of <literal>xone</literal>, which is
279+ available via the <literal>hardware.xone</literal> module.
280+ </para>
281+ </listitem>
282+ <listitem>
283+ <para>
284 The <literal>services.graphite.api</literal> and
285 <literal>services.graphite.beacon</literal> NixOS options, and
286 the <literal>python3.pkgs.graphite_api</literal>,
+2
nixos/doc/manual/release-notes/rl-2211.section.md
···105106- riak package removed along with `services.riak` module, due to lack of maintainer to update the package.
10700108- The `services.graphite.api` and `services.graphite.beacon` NixOS options, and
109 the `python3.pkgs.graphite_api`, `python3.pkgs.graphite_beacon` and
110 `python3.pkgs.influxgraph` packages, have been removed due to lack of upstream
···105106- riak package removed along with `services.riak` module, due to lack of maintainer to update the package.
107108+- xow package removed along with the `hardware.xow` module, due to the project being deprecated in favor of `xone`, which is available via the `hardware.xone` module.
109+110- The `services.graphite.api` and `services.graphite.beacon` NixOS options, and
111 the `python3.pkgs.graphite_api`, `python3.pkgs.graphite_beacon` and
112 `python3.pkgs.influxgraph` packages, have been removed due to lack of upstream
···30 udev rules from libu2f-host to the system. Udev gained native support
31 to handle FIDO security tokens, so this isn't necessary anymore.
32 '')
000033 (mkRemovedOptionModule [ "networking" "vpnc" ] "Use environment.etc.\"vpnc/service.conf\" instead.")
34 (mkRemovedOptionModule [ "networking" "wicd" ] "The corresponding package was removed from nixpkgs.")
35 (mkRemovedOptionModule [ "programs" "tilp2" ] "The corresponding package was removed from nixpkgs.")
···30 udev rules from libu2f-host to the system. Udev gained native support
31 to handle FIDO security tokens, so this isn't necessary anymore.
32 '')
33+ (mkRemovedOptionModule [ "hardware" "xow" ] ''
34+ The xow package was removed from nixpkgs. Upstream has deprecated
35+ the project and users are urged to switch to xone.
36+ '')
37 (mkRemovedOptionModule [ "networking" "vpnc" ] "Use environment.etc.\"vpnc/service.conf\" instead.")
38 (mkRemovedOptionModule [ "networking" "wicd" ] "The corresponding package was removed from nixpkgs.")
39 (mkRemovedOptionModule [ "programs" "tilp2" ] "The corresponding package was removed from nixpkgs.")
···19# path to go.mod and go.sum directory
20, modRoot ? "./"
2122-# vendorSha256 is the sha256 of the vendored dependencies
23#
24-# if vendorSha256 is null, then we won't fetch any dependencies and
25# rely on the vendor folder within the source.
26-, vendorSha256
00027# Whether to delete the vendor folder supplied with the source.
28, deleteVendor ? false
29# Whether to fetch (go mod download) and proxy the vendor directory.
30# This is useful if your code depends on c code and go mod tidy does not
31# include the needed sources to build or if any dependency has case-insensitive
32-# conflicts which will produce platform dependant `vendorSha256` checksums.
33, proxyVendor ? false
3435# We want parallel builds by default
···55with builtins;
5657assert goPackagePath != "" -> throw "`goPackagePath` is not needed with `buildGoModule`";
005859let
60- args = removeAttrs args' [ "overrideModAttrs" "vendorSha256" ];
000000006162- go-modules = if vendorSha256 != null then stdenv.mkDerivation (let modArgs = {
006364 name = "${name}-go-modules";
65···98 fi
99 '' + ''
100 if [ -d vendor ]; then
101- echo "vendor folder exists, please set 'vendorSha256 = null;' in your expression"
102 exit 10
103 fi
104···134 }; in modArgs // (
135 {
136 outputHashMode = "recursive";
0137 outputHashAlgo = "sha256";
138 outputHash = vendorSha256;
139- }
0000140 ) // overrideModAttrs modArgs) else "";
141142 package = stdenv.mkDerivation (args // {
···156 export GOPROXY=off
157 export GOSUMDB=off
158 cd "$modRoot"
159- '' + lib.optionalString (vendorSha256 != null) ''
160 ${if proxyVendor then ''
161 export GOPROXY=file://${go-modules}
162 '' else ''
···276277 disallowedReferences = lib.optional (!allowGoReference) go;
278279- passthru = passthru // { inherit go go-modules vendorSha256 ; };
280281 enableParallelBuilding = enableParallelBuilding;
282
···19# path to go.mod and go.sum directory
20, modRoot ? "./"
2122+# vendorHash is the SRI hash of the vendored dependencies
23#
24+# if vendorHash is null, then we won't fetch any dependencies and
25# rely on the vendor folder within the source.
26+, vendorHash ? "_unset"
27+# same as vendorHash, but outputHashAlgo is hardcoded to sha256
28+# so regular base32 sha256 hashes work
29+, vendorSha256 ? "_unset"
30# Whether to delete the vendor folder supplied with the source.
31, deleteVendor ? false
32# Whether to fetch (go mod download) and proxy the vendor directory.
33# This is useful if your code depends on c code and go mod tidy does not
34# include the needed sources to build or if any dependency has case-insensitive
35+# conflicts which will produce platform dependant `vendorHash` checksums.
36, proxyVendor ? false
3738# We want parallel builds by default
···58with builtins;
5960assert goPackagePath != "" -> throw "`goPackagePath` is not needed with `buildGoModule`";
61+assert (vendorSha256 == "_unset" && vendorHash == "_unset") -> throw "either `vendorHash` or `vendorSha256` is required";
62+assert (vendorSha256 != "_unset" && vendorHash != "_unset") -> throw "both `vendorHash` and `vendorSha256` set. only one can be set.";
6364let
65+ hasAnyVendorHash = (vendorSha256 != null && vendorSha256 != "_unset") || (vendorHash != null && vendorHash != "_unset");
66+ vendorHashType =
67+ if hasAnyVendorHash then
68+ if vendorSha256 != null && vendorSha256 != "_unset" then
69+ "sha256"
70+ else
71+ "sri"
72+ else
73+ null;
7475+ args = removeAttrs args' [ "overrideModAttrs" "vendorSha256" "vendorHash" ];
76+77+ go-modules = if hasAnyVendorHash then stdenv.mkDerivation (let modArgs = {
7879 name = "${name}-go-modules";
80···113 fi
114 '' + ''
115 if [ -d vendor ]; then
116+ echo "vendor folder exists, please set 'vendorHash = null;' or 'vendorSha256 = null;' in your expression"
117 exit 10
118 fi
119···149 }; in modArgs // (
150 {
151 outputHashMode = "recursive";
152+ } // (if (vendorHashType == "sha256") then {
153 outputHashAlgo = "sha256";
154 outputHash = vendorSha256;
155+ } else {
156+ outputHash = vendorHash;
157+ }) // (lib.optionalAttrs (vendorHashType == "sri" && vendorHash == "") {
158+ outputHashAlgo = "sha256";
159+ })
160 ) // overrideModAttrs modArgs) else "";
161162 package = stdenv.mkDerivation (args // {
···176 export GOPROXY=off
177 export GOSUMDB=off
178 cd "$modRoot"
179+ '' + lib.optionalString hasAnyVendorHash ''
180 ${if proxyVendor then ''
181 export GOPROXY=file://${go-modules}
182 '' else ''
···296297 disallowedReferences = lib.optional (!allowGoReference) go;
298299+ passthru = passthru // { inherit go go-modules vendorSha256 vendorHash; };
300301 enableParallelBuilding = enableParallelBuilding;
302
+3-3
pkgs/development/interpreters/nickel/default.nix
···56rustPlatform.buildRustPackage rec {
7 pname = "nickel";
8- version = "0.1.0";
910 src = fetchFromGitHub {
11 owner = "tweag";
12 repo = pname;
13 rev = "refs/tags/${version}"; # because pure ${version} doesn't work
14- hash = "sha256-St8oK9vP2cAhsNindkebtAMeRPwYggP9E4CciSZc7oA=";
15 };
1617- cargoSha256 = "sha256-VsyK/api8acIpADpXQ8RdbRLiZwHFSDH0vwQrZQ8zp4=";
1819 meta = with lib; {
20 homepage = "https://nickel-lang.org/";
···56rustPlatform.buildRustPackage rec {
7 pname = "nickel";
8+ version = "0.2.0";
910 src = fetchFromGitHub {
11 owner = "tweag";
12 repo = pname;
13 rev = "refs/tags/${version}"; # because pure ${version} doesn't work
14+ hash = "sha256-Bh83qn+ECZnlCH/A34G5G5MdcAHPow24RMCVQXR5Awg=";
15 };
1617+ cargoSha256 = "sha256-vI+SaVyRJjLNqenUsYtaSTyOZRT0zZJ1OZHekcb5LjY=";
1819 meta = with lib; {
20 homepage = "https://nickel-lang.org/";
···1+# CONFIG_LOW_LEVEL_OPTIONS is not set
2+# CONFIG_MACH_AVR is not set
3+# CONFIG_MACH_ATSAM is not set
4+# CONFIG_MACH_ATSAMD is not set
5+# CONFIG_MACH_LPC176X is not set
6+# CONFIG_MACH_STM32 is not set
7+# CONFIG_MACH_RP2040 is not set
8+# CONFIG_MACH_PRU is not set
9+# CONFIG_MACH_LINUX is not set
10+CONFIG_MACH_SIMU=y
11+CONFIG_BOARD_DIRECTORY="simulator"
12+CONFIG_CLOCK_FREQ=20000000
13+CONFIG_SERIAL=y
14+CONFIG_SIMULATOR_SELECT=y
15+CONFIG_SERIAL_BAUD=250000
16+CONFIG_USB_VENDOR_ID=0x1d50
17+CONFIG_USB_DEVICE_ID=0x614e
18+CONFIG_USB_SERIAL_NUMBER="12345"
19+CONFIG_HAVE_GPIO=y
20+CONFIG_HAVE_GPIO_ADC=y
21+CONFIG_HAVE_GPIO_SPI=y
22+CONFIG_HAVE_GPIO_HARD_PWM=y
23+CONFIG_INLINE_STEPPER_HACK=y
···408 facette = throw "facette has been removed"; # Added 2020-01-06
409 fast-neural-doodle = throw "fast-neural-doodle has been removed, as the upstream project has been abandoned"; # Added 2020-03-28
410 fastnlo = fastnlo_toolkit; # Added 2021-04-24
0411 fedora-coreos-config-transpiler = throw "fedora-coreos-config-transpiler has been renamed to 'butane'"; # Added 2021-04-13
412 feedreader = throw "feedreader is no longer activily maintained since 2019. The developer is working on a spiritual successor called NewsFlash."; # Added 2022-05-03
413 fetchFromGithub = throw "You meant fetchFromGitHub, with a capital H";
···1523 '';
1524 xf86_input_multitouch = throw "xf86_input_multitouch has been removed from nixpkgs"; # Added 2020-01-20
1525 xlibs = throw "'xlibs' has been renamed to/replaced by 'xorg'"; # Converted to throw 2022-02-22
00001526 xpraGtk3 = throw "'xpraGtk3' has been renamed to/replaced by 'xpra'"; # Converted to throw 2022-02-22
1527 xv = xxv; # Added 2020-02-22
1528 xvfb_run = xvfb-run; # Added 2021-05-07
···408 facette = throw "facette has been removed"; # Added 2020-01-06
409 fast-neural-doodle = throw "fast-neural-doodle has been removed, as the upstream project has been abandoned"; # Added 2020-03-28
410 fastnlo = fastnlo_toolkit; # Added 2021-04-24
411+ fbreader = throw "fbreader has been removed, as the upstream project has been archived"; # Added 2022-05-26
412 fedora-coreos-config-transpiler = throw "fedora-coreos-config-transpiler has been renamed to 'butane'"; # Added 2021-04-13
413 feedreader = throw "feedreader is no longer activily maintained since 2019. The developer is working on a spiritual successor called NewsFlash."; # Added 2022-05-03
414 fetchFromGithub = throw "You meant fetchFromGitHub, with a capital H";
···1524 '';
1525 xf86_input_multitouch = throw "xf86_input_multitouch has been removed from nixpkgs"; # Added 2020-01-20
1526 xlibs = throw "'xlibs' has been renamed to/replaced by 'xorg'"; # Converted to throw 2022-02-22
1527+ xow = throw (
1528+ "Upstream has ended support for 'xow' and the package has been removed" +
1529+ "from nixpkgs. Users are urged to switch to 'xone'."
1530+ ); # Added 2022-08-02
1531 xpraGtk3 = throw "'xpraGtk3' has been renamed to/replaced by 'xpra'"; # Converted to throw 2022-02-22
1532 xv = xxv; # Added 2020-02-22
1533 xvfb_run = xvfb-run; # Added 2021-05-07