mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-24 16:40:21 +00:00
Toolchain: Add nix flake
Add a nix flake to `Toolchain/` that wraps the existing nix derivation `Toolchain/serenity.nix`. This also comes with a lockfile making the nix developer enviornment setup more reproducible. We also update the documentation for "other builds" to mention the flake.
This commit is contained in:
parent
4641af7873
commit
47e0ea8e42
Notes:
sideshowbarker
2024-07-17 04:32:07 +09:00
Author: https://github.com/Alizter 🔰 Commit: https://github.com/SerenityOS/serenity/commit/47e0ea8e42 Pull-request: https://github.com/SerenityOS/serenity/pull/20865 Issue: https://github.com/SerenityOS/serenity/issues/19286 Reviewed-by: https://github.com/ADKaster
3 changed files with 86 additions and 0 deletions
|
@ -33,6 +33,12 @@ You can use the `nix-shell` script [`Toolchain/serenity.nix`](../Toolchain/seren
|
|||
nix-shell Toolchain/serenity.nix
|
||||
```
|
||||
|
||||
or you can use the nix flake [`Toolchain/flake.nix`](../Toolchain/serenity.nix) instead:
|
||||
|
||||
```console
|
||||
nix develop Toolchain
|
||||
```
|
||||
|
||||
## Alpine Linux
|
||||
|
||||
First, make sure you have enabled the `community` repository in `/etc/apk/repositories` and run `apk update`. It has been tested on `edge`, YMMV on `stable`.
|
||||
|
|
60
Toolchain/flake.lock
Normal file
60
Toolchain/flake.lock
Normal file
|
@ -0,0 +1,60 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1692799911,
|
||||
"narHash": "sha256-3eihraek4qL744EvQXsK1Ha6C3CR7nnT8X2qWap4RNk=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "f9e7cf818399d17d347f847525c5a5a8032e4e44",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1693485768,
|
||||
"narHash": "sha256-PxqYECiPBBbavaPjnf/v2rlzp2Xoe/JPA7rl1WxGe0A=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c106712dc7a447db0c8a654162c3a0557909dfd6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
20
Toolchain/flake.nix
Normal file
20
Toolchain/flake.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
description = "Serenity OS";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
outputs = { self, flake-utils, nixpkgs }:
|
||||
|
||||
flake-utils.lib.eachDefaultSystem
|
||||
(system:
|
||||
let pkgs = nixpkgs.legacyPackages.${system}; in
|
||||
{
|
||||
formatter = pkgs.nixpkgs-fmt;
|
||||
devShells.default = import ./serenity.nix { inherit pkgs; };
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
}
|
Loading…
Reference in a new issue