Meta: Get building on NixOS (#5005)

This commit is contained in:
Jonathan Turner 2021-01-23 05:44:05 +13:00 committed by GitHub
parent 2fe6a313c2
commit 0bf5669ba3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
Notes: sideshowbarker 2024-07-18 23:00:38 +09:00
82 changed files with 119 additions and 82 deletions

View file

@ -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

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -eo pipefail

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -eo pipefail

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
script_path=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
cd "$script_path/.." || exit 1

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -eo pipefail

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -eo pipefail

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -eo pipefail

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -eo pipefail

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -eu
SCRIPT=`dirname $0`

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=SDL2
version=serenity-git
workdir=SDL-master-serenity

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=bash
version=5.0
useconfigure=true

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=bc
version=2.5.1
files="https://github.com/gavinhoward/bc/releases/download/${version}/bc-${version}.tar.xz bc-${version}.tar.xz

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=binutils
version=2.32
useconfigure=true

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
clean=false
case "$1" in

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=byacc
version=20191125
files="https://invisible-mirror.net/archives/byacc/byacc-${version}.tgz byacc-${version}.tgz

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=c-ray
version=git
workdir=c-ray-master

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=curl
version=7.65.3
useconfigure=true

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=dash
version=0.5.10.2
useconfigure=true

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=diffutils
version=3.5
files="https://ftp.gnu.org/gnu/diffutils/diffutils-${version}.tar.xz diffutils-${version}.tar.xz

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=doom
workdir=SerenityDOOM-master
version=serenity-git

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=dropbear
version=2019.78
files="https://mirror.dropbear.nl/mirror/releases/dropbear-${version}.tar.bz2 dropbear-${version}.tar.bz2

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=ed
version=1.15
files="https://ftp.gnu.org/gnu/ed/ed-1.15.tar.lz ed-1.15.tar.lz"

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=editline
version=1.17.1
useconfigure=true

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=figlet
version=2.2.5
files="http://ftp.figlet.org/pub/figlet/program/unix/figlet-2.2.5.tar.gz figlet-2.2.5.tar.gz d88cb33a14f1469fff975d021ae2858e"

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=flex
version=2.6.4
files="https://github.com/westes/flex/releases/download/v${version}/flex-${version}.tar.gz flex-${version}.tar.gz

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=frotz
version=git
workdir=frotz-master

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=gcc
version=10.2.0
useconfigure=true

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=git
version=2.26.0
useconfigure="true"

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=gnuplot
version=5.2.8
useconfigure=true

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=grep
version=2.5.4
files="https://ftp.gnu.org/gnu/grep/grep-${version}.tar.gz grep-${version}.tar.gz

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=indent
version=2.2.11
files="https://ftp.gnu.org/gnu/indent/indent-${version}.tar.gz indent-${version}.tar.gz

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=jot
version=6.6
files="https://github.com/ibara/libpuffy/releases/download/libpuffy-1.0/jot-${version}.tar.gz jot-${version}.tar.gz"

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=jq
version=1.6
useconfigure=true

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=klong
version=20190926
files="http://t3x.org/klong/klong20190926.tgz klong20190926.tgz"

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=less
version=530
useconfigure="true"

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=libarchive
version=3.4.0
useconfigure=true

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=libexpat
version=2.2.9
useconfigure=true

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=libffi
version=3.3
useconfigure=true

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=libiconv
version=1.16
useconfigure=true

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=libpuffy
version=1.0
files="https://github.com/ibara/libpuffy/releases/download/libpuffy-${version}/libpuffy-${version}.tar.gz libpuffy-${version}.tar.gz"

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=links
version=2.19
useconfigure=true

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=lua
version=5.3.5
files="http://www.lua.org/ftp/lua-5.3.5.tar.gz lua-5.3.5.tar.gz 4f4b4f323fd3514a68e0ab3da8ce3455"

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=m4
version=1.4.9
useconfigure=true

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=make
version=4.3
useconfigure=true

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=mandoc
version=1.14.5
useconfigure=true

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=mawk
version=1.3.4-20200120
files="https://invisible-mirror.net/archives/mawk/mawk-${version}.tgz mawk-${version}.tgz

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=mbedtls
version=2.16.2
files="https://tls.mbed.org/download/mbedtls-${version}-apache.tgz mbedtls-${version}-apache.tgz ba809acfd4b41b86895b92e98d936695b5b62b73"

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=mrsh
version=d9763a32e7da572677d1681bb1fc67f117d641f3
files="https://codeload.github.com/emersion/mrsh/legacy.tar.gz/d9763a32e7da572677d1681bb1fc67f117d641f3 emersion-mrsh-d9763a3.tar.gz"

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=nano
version=4.5
useconfigure="true"

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=nasm
version=2.14.02
files="https://www.nasm.us/pub/nasm/releasebuilds/2.14.02/nasm-2.14.02.tar.gz nasm-2.14.02.tar.gz"

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=ncurses
version=6.2
useconfigure=true

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=neofetch
version=7.0.0
useconfigure=false

View file

@ -2,7 +2,7 @@
+++ neofetch-7.0.0/neofetch 2020-04-27 18:57:54.263417418 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/bin/bash
+#!/usr/bin/env bash
# vim: noai:ts=4:sw=4:expandtab
# shellcheck source=/dev/null
# shellcheck disable=2009

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=nesalizer
version=master
makeopts="CONF=release"

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=ninja
version=1.8.2
workdir=ninja-1.8.2

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=nyancat
version=git
workdir=nyancat-master

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=openssh
workdir=openssh-portable-9ca7e9c861775dd6c6312bc8aaab687403d24676
version=8.3-9ca7e9c

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=openssl
branch='1.0.2'
version="${branch}t"

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=patch
version=6.6
files="https://github.com/ibara/libpuffy/releases/download/libpuffy-1.0/patch-${version}.tar.gz patch-${version}.tar.gz"

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=pcre2
version=10.34
useconfigure=true

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=pkgconf
version=1.7.3
files="https://distfiles.dereferenced.org/pkgconf/pkgconf-1.7.3.tar.xz pkgconf-1.7.3.tar.xz"

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=printf
version=6.6
files="https://github.com/ibara/libpuffy/releases/download/libpuffy-1.0/printf-${version}.tar.gz printf-${version}.tar.gz"

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=quake
version=0.65
workdir=SerenityQuake-master

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=rsync
version=3.1.3
useconfigure="true"

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=sed
version=4.2.1
useconfigure="true"

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=sl
version=git
workdir=sl-master

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=stress-ng
version=0.11.23
workdir=stress-ng-${version}

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=termcap
version=1.3.1
useconfigure=true

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=tinycc
workdir=tinycc-dev
version=dev

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=tr
version=6.7
files="https://github.com/ibara/libpuffy/releases/download/libpuffy-1.0/tr-${version}.tar.gz tr-${version}.tar.gz"

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=vim
version=git
workdir=vim-master

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=vttest
version=20200610
useconfigure=true

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=zlib
version=1.2.11
useconfigure=true

View file

@ -1,4 +1,4 @@
#!/bin/bash ../.port_include.sh
#!/usr/bin/env -S bash ../.port_include.sh
port=zstd
version=1.4.4
files="https://github.com/facebook/zstd/releases/download/v${version}/zstd-${version}.tar.gz zstd-${version}.tar.gz

View file

@ -1,5 +1,4 @@
#!/usr/bin/env bash
set -e
# This file will need to be run in bash, for now.

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
# This file will need to be run in bash, for now.

View file

@ -390,7 +390,7 @@ add_custom_target(generate_PropertyID.h DEPENDS CSS/PropertyID.h)
add_custom_command(
OUTPUT CSS/PropertyID.cpp
COMMAND /bin/mkdir -p CSS
COMMAND /usr/bin/env -S mkdir -p CSS
COMMAND ${write_if_different} CSS/PropertyID.cpp CodeGenerators/Generate_CSS_PropertyID_cpp ${CMAKE_CURRENT_SOURCE_DIR}/CSS/Properties.json
VERBATIM
DEPENDS Generate_CSS_PropertyID_cpp
@ -408,7 +408,7 @@ add_custom_target(generate_ValueID.h DEPENDS CSS/ValueID.h)
add_custom_command(
OUTPUT CSS/ValueID.cpp
COMMAND /bin/mkdir -p CSS
COMMAND /usr/bin/env -S mkdir -p CSS
COMMAND ${write_if_different} CSS/ValueID.cpp CodeGenerators/Generate_CSS_ValueID_cpp ${CMAKE_CURRENT_SOURCE_DIR}/CSS/Identifiers.json
VERBATIM
DEPENDS Generate_CSS_ValueID_cpp