mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-12 04:22:28 +00:00
Meta: Get building on NixOS (#5005)
This commit is contained in:
parent
2fe6a313c2
commit
0bf5669ba3
Notes:
sideshowbarker
2024-07-18 23:00:38 +09:00
Author: https://github.com/jonathandturner 🔰
Commit: 0bf5669ba3
Pull-request: https://github.com/SerenityOS/serenity/pull/5005
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/asynts
Reviewed-by: https://github.com/bugaevc
Reviewed-by: https://github.com/emanuele6
Reviewed-by: https://github.com/sophiajt
82 changed files with 119 additions and 82 deletions
|
@ -57,6 +57,44 @@ sudo apt update
|
|||
|
||||
Ensure your CMake version is >= 3.16 with `cmake --version`. If your system doesn't provide a suitable version of CMake, you can download a binary release from the [CMake website](https://cmake.org/download).
|
||||
|
||||
**NixOS**
|
||||
|
||||
You can use a `nix-shell` script like the following to set up the correct environment:
|
||||
|
||||
myshell.nix:
|
||||
```
|
||||
with import <nixpkgs> {};
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "cpp-env";
|
||||
nativeBuildInputs = [
|
||||
gcc10
|
||||
curl
|
||||
cmake
|
||||
mpfr
|
||||
ninja
|
||||
gmp
|
||||
libmpc
|
||||
e2fsprogs
|
||||
patch
|
||||
|
||||
# Example Build-time Additional Dependencies
|
||||
pkgconfig
|
||||
];
|
||||
buildInputs = [
|
||||
# Example Run-time Additional Dependencies
|
||||
openssl
|
||||
x11
|
||||
# glibc
|
||||
];
|
||||
hardeningDisable = [ "format" "fortify" ];
|
||||
}
|
||||
```
|
||||
|
||||
Then use this script: `nix-shell myshell.nix`.
|
||||
|
||||
Once you're in nix-shell, you should be able to follow the build directions.
|
||||
|
||||
#### macOS prerequisites
|
||||
Make sure you have all the dependencies installed:
|
||||
```bash
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue