Unverified Commit 5affd239 authored by nixpkgs-ci[bot]'s avatar nixpkgs-ci[bot] Committed by GitHub
Browse files

Merge master into staging-next

parents 1d7ad57d 74c38add
Loading
Loading
Loading
Loading
+29 −0
Original line number Diff line number Diff line
@@ -736,6 +736,35 @@ stdenv.mkDerivation (finalAttrs: {
})
```

### Compiling `wasm32-wasip1` package {#compiling-wasm32-wasip1-package}

```nix
pkgsCross.wasi32.callPackage (
  {
    fetchFromGitHub,
    rustPlatform,
    lld,
  }:
  rustPlatform.buildRustPackage (finalAttrs: {
    pname = "zellij-harpoon";
    version = "0.3.0";

    src = fetchFromGitHub {
      owner = "Nacho114";
      repo = "harpoon";
      tag = "v${finalAttrs.version}";
      hash = "sha256-JmYcbzxIF6qZs2/RKuspHqNpyDibGp9CVQJj47y/BOQ=";
    };

    cargoHash = "sha256-lsv5Wssakni18jif++fPo3Z5WyBtvPsGpWwG3abR7jQ=";

    # these two lines are currently required
    env.RUSTFLAGS = "-C linker=wasm-ld";
    nativeBuildInputs = [ lld ];
  })
) { }
```

## `buildRustCrate`: Compiling Rust crates using Nix instead of Cargo {#compiling-rust-crates-using-nix-instead-of-cargo}

### Simple operation {#simple-operation}
+3 −0
Original line number Diff line number Diff line
@@ -20,6 +20,9 @@
  "cmake-ctest-variables": [
    "index.html#cmake-ctest-variables"
  ],
  "compiling-wasm32-wasip1-package": [
    "index.html#compiling-wasm32-wasip1-package"
  ],
  "coq-withPackages": [
    "index.html#coq-withPackages"
  ],
+5 −0
Original line number Diff line number Diff line
@@ -1495,6 +1495,11 @@ lib.mapAttrs mkLicense (
      fullName = "Unicode Terms of Use";
    };

    universalFOSSException-10 = {
      spdxId = "Universal-FOSS-exception-1.0";
      fullName = "Universal FOSS Exception, Version 1.0";
    };

    unlicense = {
      spdxId = "Unlicense";
      fullName = "The Unlicense";
+10 −1
Original line number Diff line number Diff line
@@ -590,7 +590,16 @@ rec {
          );
        }
        //
          optionalAttrs (opt ? defaultText || opt ? default || ((opt.type or { }).emptyValue or { }) ? value)
          optionalAttrs
            (
              opt ? defaultText
              || opt ? default
              # Render emptyValue-based defaults, but only for types without
              # submodules (e.g. types.submodule). Submodules may evaluate to
              # error without user defs, and their sub-options are documented
              # individually, so best to skip those here.
              || ((opt.type or { }).emptyValue or { }) ? value && (opt.type or { }).getSubModules or null == null
            )
            {
              default =
                builtins.addErrorContext
+2 −0
Original line number Diff line number Diff line
@@ -686,6 +686,8 @@ checkConfigOutput "\[\]" config.unique ./defaults.nix
checkConfigOutput "\[\]" config.coercedTo ./defaults.nix
# These types don't have empty values
checkConfigError 'The option .int. was accessed but has no value defined. Try setting the option.' config.int ./defaults.nix
## submodule emptyValue must evaluate sub-option defaults
checkConfigOutput "ok" config.result ./defaults.nix

# types.unique
#   requires a single definition
Loading