mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:47:37 +00:00
Meta: Get building on NixOS (#5005)
This commit is contained in:
parent
2fe6a313c2
commit
0bf5669ba3
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