mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-22 01:02:14 -05:00
Flake: Add and run formatter + Rename devshell
Add a formatter output to the flake (`nix fmt`), along with moving + renaming the devshell so it will work by running `nix-shell` in the root of the project.
This commit is contained in:
parent
6969d1eba3
commit
61fcccb104
Notes:
github-actions[bot]
2024-12-18 15:16:44 +00:00
Author: https://github.com/ttrssreal Commit: https://github.com/LadybirdBrowser/ladybird/commit/61fcccb104c Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2918
4 changed files with 50 additions and 34 deletions
|
@ -114,10 +114,10 @@ nix develop
|
|||
nix develop --command bash
|
||||
|
||||
# Using nix-shell
|
||||
nix-shell UI
|
||||
nix-shell
|
||||
|
||||
# Using nix-shell and a custom shell
|
||||
nix-shell UI --command bash
|
||||
nix-shell --command bash
|
||||
```
|
||||
|
||||
Then invoke `cmake` directly. For example:
|
||||
|
|
40
flake.lock
40
flake.lock
|
@ -1,5 +1,23 @@
|
|||
{
|
||||
"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": 1731676054,
|
||||
|
@ -18,8 +36,8 @@
|
|||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs",
|
||||
"utils": "utils"
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
|
@ -36,24 +54,6 @@
|
|||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"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"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
|
24
flake.nix
24
flake.nix
|
@ -3,12 +3,24 @@
|
|||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
utils.url = "github:numtide/flake-utils";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, utils, }: utils.lib.eachDefaultSystem (system: let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
in {
|
||||
devShells.default = import ./UI { inherit pkgs; };
|
||||
});
|
||||
outputs =
|
||||
{
|
||||
nixpkgs,
|
||||
flake-utils,
|
||||
...
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (
|
||||
system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
{
|
||||
devShells.default = import ./shell.nix { inherit pkgs; };
|
||||
|
||||
formatter = pkgs.nixfmt-rfc-style;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,15 +1,19 @@
|
|||
{ pkgs ? import <nixpkgs> { } }:
|
||||
{
|
||||
pkgs ? import <nixpkgs> { },
|
||||
}:
|
||||
|
||||
pkgs.mkShell {
|
||||
packages = with pkgs; [
|
||||
ccache
|
||||
] ++ (with qt6Packages; [
|
||||
inputsFrom = [
|
||||
pkgs.ladybird
|
||||
];
|
||||
|
||||
packages = with pkgs.qt6Packages; [
|
||||
qtbase.dev
|
||||
qttools
|
||||
qtwayland.dev
|
||||
]);
|
||||
|
||||
inputsFrom = [ pkgs.ladybird ];
|
||||
pkgs.ccache
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
# NOTE: This is required to make it find the wayland platform plugin installed
|
Loading…
Reference in a new issue