Nix: Remove flake-utils from inputs

Motive: flake-utils is an unnecessary abstraction library that manages
to creep into every project under the guise of making things "easier."
There is no reason to use flake-utils here, as Nix is a powerful enough
DSL to handle system abstractions in-house without relying on more 3rd
party code, especially in a flake as small as Ladybird's.

We are not re-inventing the wheel; we are merely going back to circle
wheels.
This commit is contained in:
NotAShelf 2025-03-04 16:59:53 +03:00 committed by Andrew Kaster
parent e34a6c86b9
commit 41622eaf51
Notes: github-actions[bot] 2025-03-04 15:21:00 +00:00
2 changed files with 29 additions and 38 deletions

32
flake.lock generated
View file

@ -1,34 +1,16 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1738410390,
"narHash": "sha256-xvTo0Aw0+veek7hvEVLzErmJyQkEcRk6PSR4zsRQFEc=",
"owner": "NixOS",
"lastModified": 1741010256,
"narHash": "sha256-WZNlK/KX7Sni0RyqLSqLPbK8k08Kq7H7RijPJbq9KHM=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "3a228057f5b619feb3186e986dbe76278d707b6e",
"rev": "ba487dbc9d04e0634c64e3b1f0d25839a0a68246",
"type": "github"
},
"original": {
"owner": "NixOS",
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
@ -36,8 +18,8 @@
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs",
"systems": "systems"
}
},
"systems": {

View file

@ -2,25 +2,34 @@
description = "Ladybird";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
systems.url = "github:nix-systems/default";
};
outputs =
{
self,
systems,
nixpkgs,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
devShells.default = import ./shell.nix { inherit pkgs; };
let
eachSystem = nixpkgs.lib.genAttrs (import systems);
in
{
devShells = eachSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
default = pkgs.callPackage ./Nix/shell.nix {
inherit (self.packages.${system}) ladybird;
};
}
);
formatter = pkgs.nixfmt-rfc-style;
}
);
# Provide a formatter for `nix fmt`
formatter = eachSystem (system: nixpkgs.legacyPackages.${system}.nixfmt-rfc-style);
};
}