diff --git a/scripts/bootstrap b/scripts/bootstrap index 4ac72fa7b..3a8a74e56 100755 --- a/scripts/bootstrap +++ b/scripts/bootstrap @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash git submodule init git submodule update diff --git a/scripts/build b/scripts/build index bf5353f54..ccc472cb7 100755 --- a/scripts/build +++ b/scripts/build @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash mkdir ./build &> /dev/null meson . ./build --buildtype=release diff --git a/scripts/nixbuild b/scripts/nixbuild new file mode 100755 index 000000000..20ec10055 --- /dev/null +++ b/scripts/nixbuild @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +nix-shell --pure --run ./scripts/build diff --git a/shell.nix b/shell.nix new file mode 100644 index 000000000..817082edc --- /dev/null +++ b/shell.nix @@ -0,0 +1,16 @@ +with (import {}); + +let + + osxdeps = lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + Cocoa + CoreServices + ]); + + deps = [ cmark curl gcc gmp libsigsegv meson ncurses ninja pkgconfig zlib re2c ]; + +in stdenv.mkDerivation { + name = "urbit"; + buildInputs = osxdeps ++ deps; + NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-framework CoreServices"; +}