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

Merge master into staging-nixos

parents 5ca45da0 1c8355b1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -93,7 +93,7 @@ there are 3 steps: frontend dependencies (javascript), backend dependencies (eli

##### mixRelease - Frontend dependencies (javascript) {#mix-release-javascript-deps}

For phoenix projects, inside of Nixpkgs you can either use yarn2nix (mkYarnModule) or node2nix. An example with yarn2nix can be found [here](https://github.com/NixOS/nixpkgs/blob/master/pkgs/servers/web-apps/plausible/default.nix#L39). An example with node2nix will follow. To package something outside of nixpkgs, you have alternatives like [npmlock2nix](https://github.com/nix-community/npmlock2nix) or [nix-npm-buildpackage](https://github.com/serokell/nix-npm-buildpackage)
For phoenix projects, inside of Nixpkgs you can either use `fetchYarnDeps` or `buildNpmPackage`. An example with `fetchYarnDeps` can be found [here](https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/pl/plausible/package.nix). An example with `fetchYarnDeps` will follow. To package something outside of nixpkgs, you have alternatives like [npmlock2nix](https://github.com/nix-community/npmlock2nix) or [nix-npm-buildpackage](https://github.com/serokell/nix-npm-buildpackage)

##### mixRelease - backend dependencies (mix) {#mix-release-mix-deps}

+1 −0
Original line number Diff line number Diff line
@@ -89,6 +89,7 @@ Exceptions to this rule are:
Each tool has an abstraction to just build the node_modules (dependencies) directory.
You can always use the `stdenv.mkDerivation` with the node_modules to build the package (symlink the node_modules directory and then use the package build command).
The node_modules abstraction can be also used to build some web framework frontends.
For an example of this see how [plausible](https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/pl/plausible/package.nix) is built.
Then when building the frontend you can just symlink the node_modules directory.

## Tool-specific instructions {#javascript-tool-specific}
+15 −0
Original line number Diff line number Diff line
@@ -278,6 +278,21 @@ rec {
      attr ? ${name} && !(hasPrefix "@" attr.${name})
    ) "Systemd ${group} field `${name}' is not a systemd credential";

  assertRouteMetricOrTriple =
    name: group: attr:
    let
      isMetric = n: 0 <= n && 4294967295 >= n;

      parts = splitString ":" attr.${name};
      partsValid =
        length parts == 3 && all (p: (match "[0-9]+" p) != null && isMetric (toIntBase10 p)) parts;
      valid = (isInt attr.${name} && isMetric attr.${name}) || partsValid;
    in
    optional (attr ? ${name} && !valid) (
      "Systemd ${group} field `${name}' must either be an integer in the range [0,4294967295]"
      + " or a string containing three integers separated with `:`"
    );

  checkUnitConfig =
    group: checks: attrs:
    let
+1 −1
Original line number Diff line number Diff line
@@ -92,7 +92,7 @@ in
            -i ${channelSources} --quiet --option build-use-substitutes false \
            ${lib.optionalString config.boot.initrd.systemd.enable "--option sandbox false"} # There's an issue with pivot_root
          mkdir -m 0700 -p /root/.nix-defexpr
          ln -s /nix/var/nix/profiles/per-user/root/channels /root/.nix-defexpr/channels
          ln -sfvT /nix/var/nix/profiles/per-user/root/channels /root/.nix-defexpr/channels
          mkdir -m 0755 -p /var/lib/nixos
          touch /var/lib/nixos/did-channel-init
        fi
+4 −0
Original line number Diff line number Diff line
@@ -455,6 +455,10 @@ in
          assertion = cfg.efiSupport;
          message = "Secure boot is only supported on EFI systems.";
        }
        {
          assertion = !cfg.enableEditor;
          message = "Editor is unconditionally disabled by Limine.";
        }
      ];

      boot.loader.limine.enrollConfig = true;
Loading