From e6c8e141e25a71495da71e9adcd39e9374927403 Mon Sep 17 00:00:00 2001 From: Andrea Maria Piana Date: Wed, 29 Nov 2023 09:46:22 +0000 Subject: [PATCH] Add shell.nix file I have added a shell.nix file that helps setting up the environment for building if nix is installed. To use it you can run `nix-shell shell.nix` which will install all the required dependecies, and then just `make run` should work. --- shell.nix | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 shell.nix diff --git a/shell.nix b/shell.nix new file mode 100644 index 000000000..ebf89cc73 --- /dev/null +++ b/shell.nix @@ -0,0 +1,42 @@ +{ pkgs ? import (builtins.fetchTarball { + url = "https://github.com/NixOS/nixpkgs/archive/e7603eba51f2c7820c0a182c6bbb351181caa8e7.zip"; + sha256 = "sha256:0mwck8jyr74wh1b7g6nac1mxy6a0rkppz8n12andsffybsipz5jw"; + }) { } }: + +let + qtCustom = with pkgs.qt515; + env "qt-custom-${qtbase.version}" ([ + qtquickcontrols2 + qtgraphicaleffects + qtbase qttools qtdeclarative + qtlottie qtmultimedia + qtquickcontrols qtquickcontrols2 + qtsvg qtwebengine qtwebview + ]); +in pkgs.mkShell { + name = "status-desktop-build-shell"; + + buildInputs = with pkgs; [ + qt5Full + bash curl wget git file unzip jq lsb-release + cmake gnumake pkg-config gnugrep qtCustom + go_1_19 + pcre nss pcsclite extra-cmake-modules + xorg.libxcb xorg.libX11 libxkbcommon + ] ++ (with gst_all_1; [ + gst-libav gstreamer + gst-plugins-bad gst-plugins-base + gst-plugins-good gst-plugins-ugly + ]); + + # Avoid terminal issues. + TERM = "xterm"; + LANG = "en_US.UTF-8"; + LANGUAGE = "en_US.UTF-8"; + + QTDIR = qtCustom; + + shellHook = '' + export MAKEFLAGS="-j$NIX_BUILD_CORES" + ''; +}