From 0746f72965b4b7b767c8148ad4413ffbc9b9e896 Mon Sep 17 00:00:00 2001 From: RainingComputers Date: Wed, 8 Jan 2025 13:03:17 +0530 Subject: [PATCH] Add nix environment --- .envrc | 5 +++++ .gitignore | 5 ++++- README.md | 3 +-- shell.nix | 19 +++++++++++++++++++ version | 2 +- 5 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 .envrc create mode 100644 shell.nix diff --git a/.envrc b/.envrc new file mode 100644 index 00000000..86c414a6 --- /dev/null +++ b/.envrc @@ -0,0 +1,5 @@ +if ! has nix_direnv_version || ! nix_direnv_version 3.0.5; then + source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.5/direnvrc" "sha256-RuwIS+QKFj/T9M2TFXScjBsLR6V3A17YVoEW/Q6AZ1w=" +fi + +use nix \ No newline at end of file diff --git a/.gitignore b/.gitignore index 8a8c4147..a9f16ec6 100644 --- a/.gitignore +++ b/.gitignore @@ -81,4 +81,7 @@ build-name.txt *.log # temporary scripts -gh-md-toc \ No newline at end of file +gh-md-toc + +# direnv +.direnv/ \ No newline at end of file diff --git a/README.md b/README.md index 6e855bc8..5775ae9a 100644 --- a/README.md +++ b/README.md @@ -37,8 +37,7 @@ Download app image from [releases](https://github.com/RainingComputers/ShnooTalk Download the source from latest [release](https://github.com/RainingComputers/ShnooTalk/releases) ``` -sudo apt install llvm-12 llvm-12-dev -make build +./ci/Linux/build.sh llvmorg-12.0.1/clang+llvm-12.0.1-x86_64-linux-gnu-ubuntu-16.04.tar.xz sudo make install ``` diff --git a/shell.nix b/shell.nix new file mode 100644 index 00000000..c4be102f --- /dev/null +++ b/shell.nix @@ -0,0 +1,19 @@ +let + nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-24.11"; + pkgs = import nixpkgs { config = {}; overlays = []; }; +in + +pkgs.mkShellNoCC { + packages = with pkgs; [ + llvmPackages_12.libllvm + ccache + python39 + lcov + clang + gcc + ]; + + shellHook = '' + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`llvm-config --libdir` + ''; +} \ No newline at end of file diff --git a/version b/version index bcea87ee..31a28345 100644 --- a/version +++ b/version @@ -1 +1 @@ -0.3.1-alpha +0.3.2-alpha