···11111212In the following is an example expression using `buildGoModule`, the following arguments are of special significance to the function:
13131414-- `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;`
1515-- `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.
1414+- `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;`
1515+- `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.
16161717```nix
1818pet = buildGoModule rec {
···2626 sha256 = "0m2fzpqxk7hrbxsgqplkg7h2p7gv6s1miymv3gvw0cz039skag0s";
2727 };
28282929- vendorSha256 = "1879j77k96684wi554rkjxydrj8g3hpp0kvxz03sd8dmwr3lh83j";
2929+ vendorHash = "sha256-ciBIR+a1oaYH+H1PcC8cD8ncfJczk1IiJ8iYNM+R6aA=";
30303131 meta = with lib; {
3232 description = "Simple command-line snippet manager, written in Go";
···273273 </listitem>
274274 <listitem>
275275 <para>
276276+ xow package removed along with the
277277+ <literal>hardware.xow</literal> module, due to the project
278278+ being deprecated in favor of <literal>xone</literal>, which is
279279+ available via the <literal>hardware.xone</literal> module.
280280+ </para>
281281+ </listitem>
282282+ <listitem>
283283+ <para>
276284 The <literal>services.graphite.api</literal> and
277285 <literal>services.graphite.beacon</literal> NixOS options, and
278286 the <literal>python3.pkgs.graphite_api</literal>,
+2
nixos/doc/manual/release-notes/rl-2211.section.md
···105105106106- riak package removed along with `services.riak` module, due to lack of maintainer to update the package.
107107108108+- 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.
109109+108110- The `services.graphite.api` and `services.graphite.beacon` NixOS options, and
109111 the `python3.pkgs.graphite_api`, `python3.pkgs.graphite_beacon` and
110112 `python3.pkgs.influxgraph` packages, have been removed due to lack of upstream
···3030 udev rules from libu2f-host to the system. Udev gained native support
3131 to handle FIDO security tokens, so this isn't necessary anymore.
3232 '')
3333+ (mkRemovedOptionModule [ "hardware" "xow" ] ''
3434+ The xow package was removed from nixpkgs. Upstream has deprecated
3535+ the project and users are urged to switch to xone.
3636+ '')
3337 (mkRemovedOptionModule [ "networking" "vpnc" ] "Use environment.etc.\"vpnc/service.conf\" instead.")
3438 (mkRemovedOptionModule [ "networking" "wicd" ] "The corresponding package was removed from nixpkgs.")
3539 (mkRemovedOptionModule [ "programs" "tilp2" ] "The corresponding package was removed from nixpkgs.")
···1919# path to go.mod and go.sum directory
2020, modRoot ? "./"
21212222-# vendorSha256 is the sha256 of the vendored dependencies
2222+# vendorHash is the SRI hash of the vendored dependencies
2323#
2424-# if vendorSha256 is null, then we won't fetch any dependencies and
2424+# if vendorHash is null, then we won't fetch any dependencies and
2525# rely on the vendor folder within the source.
2626-, vendorSha256
2626+, vendorHash ? "_unset"
2727+# same as vendorHash, but outputHashAlgo is hardcoded to sha256
2828+# so regular base32 sha256 hashes work
2929+, vendorSha256 ? "_unset"
2730# Whether to delete the vendor folder supplied with the source.
2831, deleteVendor ? false
2932# Whether to fetch (go mod download) and proxy the vendor directory.
3033# This is useful if your code depends on c code and go mod tidy does not
3134# include the needed sources to build or if any dependency has case-insensitive
3232-# conflicts which will produce platform dependant `vendorSha256` checksums.
3535+# conflicts which will produce platform dependant `vendorHash` checksums.
3336, proxyVendor ? false
34373538# We want parallel builds by default
···5558with builtins;
56595760assert goPackagePath != "" -> throw "`goPackagePath` is not needed with `buildGoModule`";
6161+assert (vendorSha256 == "_unset" && vendorHash == "_unset") -> throw "either `vendorHash` or `vendorSha256` is required";
6262+assert (vendorSha256 != "_unset" && vendorHash != "_unset") -> throw "both `vendorHash` and `vendorSha256` set. only one can be set.";
58635964let
6060- args = removeAttrs args' [ "overrideModAttrs" "vendorSha256" ];
6565+ hasAnyVendorHash = (vendorSha256 != null && vendorSha256 != "_unset") || (vendorHash != null && vendorHash != "_unset");
6666+ vendorHashType =
6767+ if hasAnyVendorHash then
6868+ if vendorSha256 != null && vendorSha256 != "_unset" then
6969+ "sha256"
7070+ else
7171+ "sri"
7272+ else
7373+ null;
61746262- go-modules = if vendorSha256 != null then stdenv.mkDerivation (let modArgs = {
7575+ args = removeAttrs args' [ "overrideModAttrs" "vendorSha256" "vendorHash" ];
7676+7777+ go-modules = if hasAnyVendorHash then stdenv.mkDerivation (let modArgs = {
63786479 name = "${name}-go-modules";
6580···98113 fi
99114 '' + ''
100115 if [ -d vendor ]; then
101101- echo "vendor folder exists, please set 'vendorSha256 = null;' in your expression"
116116+ echo "vendor folder exists, please set 'vendorHash = null;' or 'vendorSha256 = null;' in your expression"
102117 exit 10
103118 fi
104119···134149 }; in modArgs // (
135150 {
136151 outputHashMode = "recursive";
152152+ } // (if (vendorHashType == "sha256") then {
137153 outputHashAlgo = "sha256";
138154 outputHash = vendorSha256;
139139- }
155155+ } else {
156156+ outputHash = vendorHash;
157157+ }) // (lib.optionalAttrs (vendorHashType == "sri" && vendorHash == "") {
158158+ outputHashAlgo = "sha256";
159159+ })
140160 ) // overrideModAttrs modArgs) else "";
141161142162 package = stdenv.mkDerivation (args // {
···156176 export GOPROXY=off
157177 export GOSUMDB=off
158178 cd "$modRoot"
159159- '' + lib.optionalString (vendorSha256 != null) ''
179179+ '' + lib.optionalString hasAnyVendorHash ''
160180 ${if proxyVendor then ''
161181 export GOPROXY=file://${go-modules}
162182 '' else ''
···276296277297 disallowedReferences = lib.optional (!allowGoReference) go;
278298279279- passthru = passthru // { inherit go go-modules vendorSha256 ; };
299299+ passthru = passthru // { inherit go go-modules vendorSha256 vendorHash; };
280300281301 enableParallelBuilding = enableParallelBuilding;
282302
+3-3
pkgs/development/interpreters/nickel/default.nix
···5566rustPlatform.buildRustPackage rec {
77 pname = "nickel";
88- version = "0.1.0";
88+ version = "0.2.0";
991010 src = fetchFromGitHub {
1111 owner = "tweag";
1212 repo = pname;
1313 rev = "refs/tags/${version}"; # because pure ${version} doesn't work
1414- hash = "sha256-St8oK9vP2cAhsNindkebtAMeRPwYggP9E4CciSZc7oA=";
1414+ hash = "sha256-Bh83qn+ECZnlCH/A34G5G5MdcAHPow24RMCVQXR5Awg=";
1515 };
16161717- cargoSha256 = "sha256-VsyK/api8acIpADpXQ8RdbRLiZwHFSDH0vwQrZQ8zp4=";
1717+ cargoSha256 = "sha256-vI+SaVyRJjLNqenUsYtaSTyOZRT0zZJ1OZHekcb5LjY=";
18181919 meta = with lib; {
2020 homepage = "https://nickel-lang.org/";
···11+# CONFIG_LOW_LEVEL_OPTIONS is not set
22+# CONFIG_MACH_AVR is not set
33+# CONFIG_MACH_ATSAM is not set
44+# CONFIG_MACH_ATSAMD is not set
55+# CONFIG_MACH_LPC176X is not set
66+# CONFIG_MACH_STM32 is not set
77+# CONFIG_MACH_RP2040 is not set
88+# CONFIG_MACH_PRU is not set
99+# CONFIG_MACH_LINUX is not set
1010+CONFIG_MACH_SIMU=y
1111+CONFIG_BOARD_DIRECTORY="simulator"
1212+CONFIG_CLOCK_FREQ=20000000
1313+CONFIG_SERIAL=y
1414+CONFIG_SIMULATOR_SELECT=y
1515+CONFIG_SERIAL_BAUD=250000
1616+CONFIG_USB_VENDOR_ID=0x1d50
1717+CONFIG_USB_DEVICE_ID=0x614e
1818+CONFIG_USB_SERIAL_NUMBER="12345"
1919+CONFIG_HAVE_GPIO=y
2020+CONFIG_HAVE_GPIO_ADC=y
2121+CONFIG_HAVE_GPIO_SPI=y
2222+CONFIG_HAVE_GPIO_HARD_PWM=y
2323+CONFIG_INLINE_STEPPER_HACK=y
···408408 facette = throw "facette has been removed"; # Added 2020-01-06
409409 fast-neural-doodle = throw "fast-neural-doodle has been removed, as the upstream project has been abandoned"; # Added 2020-03-28
410410 fastnlo = fastnlo_toolkit; # Added 2021-04-24
411411+ fbreader = throw "fbreader has been removed, as the upstream project has been archived"; # Added 2022-05-26
411412 fedora-coreos-config-transpiler = throw "fedora-coreos-config-transpiler has been renamed to 'butane'"; # Added 2021-04-13
412413 feedreader = throw "feedreader is no longer activily maintained since 2019. The developer is working on a spiritual successor called NewsFlash."; # Added 2022-05-03
413414 fetchFromGithub = throw "You meant fetchFromGitHub, with a capital H";
···15231524 '';
15241525 xf86_input_multitouch = throw "xf86_input_multitouch has been removed from nixpkgs"; # Added 2020-01-20
15251526 xlibs = throw "'xlibs' has been renamed to/replaced by 'xorg'"; # Converted to throw 2022-02-22
15271527+ xow = throw (
15281528+ "Upstream has ended support for 'xow' and the package has been removed" +
15291529+ "from nixpkgs. Users are urged to switch to 'xone'."
15301530+ ); # Added 2022-08-02
15261531 xpraGtk3 = throw "'xpraGtk3' has been renamed to/replaced by 'xpra'"; # Converted to throw 2022-02-22
15271532 xv = xxv; # Added 2020-02-22
15281533 xvfb_run = xvfb-run; # Added 2021-05-07