nix: add shell.nix for CI builds
This currently doesn't work becuase of lack Qml and QtQuick: ``` test.qml:1 module "QtQuick" is not installed ``` https://github.com/NixOS/nixpkgs/issues/51990 Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
611598ec71
commit
54c967db3e
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.8.0'
|
||||
library 'status-jenkins-lib@linux-use-nix'
|
||||
|
||||
/* Options section can't access functions in objects. */
|
||||
def isPRBuild = utils.isPRBuild()
|
||||
|
@ -72,21 +72,21 @@ pipeline {
|
|||
|
||||
stages {
|
||||
stage('Deps') {
|
||||
steps {
|
||||
sh 'make update'
|
||||
sh 'make deps'
|
||||
}
|
||||
steps { script {
|
||||
nix.shell('make update', pure: false)
|
||||
nix.shell('make deps', pure: false)
|
||||
} }
|
||||
}
|
||||
|
||||
stage('status-go') {
|
||||
steps {
|
||||
sh 'make status-go'
|
||||
}
|
||||
steps { script {
|
||||
nix.shell('make status-go', pure: false)
|
||||
} }
|
||||
}
|
||||
|
||||
stage('Package') {
|
||||
steps { script {
|
||||
linux.bundle('tgz-linux')
|
||||
linux.bundle('tgz-linux', 1)
|
||||
} }
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
# NOTE: If you are in Asia you might want to add https://nix-cache-cn.status.im/ to extra-substituters
|
||||
extra-substituters = https://nix-cache.status.im/
|
||||
substituters = https://cache.nixos.org/
|
||||
trusted-public-keys = nix-cache.status.im-1:x/93lOfLU+duPplwMSBR+OlY4+mo+dCN7n0mr4oPwgY= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
|
||||
# Some downloads are multiple GB, default is 5 minutes
|
||||
stalled-download-timeout = 3600
|
||||
connect-timeout = 10
|
||||
max-jobs = auto
|
||||
# Helps avoid removing currently used dependencies via garbage collection
|
||||
keep-derivations = true
|
||||
keep-outputs = true
|
|
@ -0,0 +1,48 @@
|
|||
{
|
||||
source ? builtins.fetchTarball {
|
||||
url = "https://github.com/NixOS/nixpkgs/archive/c140730d40d723c3c74a8d24bceef363495a3aef.zip";
|
||||
sha256 = "sha256:1bcms35idl4mggickf97z6sydyr8iyjjw93iahhzwczwc42dgs0b";
|
||||
},
|
||||
pkgs ? import (source) { }
|
||||
}:
|
||||
|
||||
let
|
||||
qtCustom = with pkgs.qt515; /* 5.15.8 */
|
||||
env "qt-custom-${qtbase.version}" ([
|
||||
qtbase
|
||||
qtdeclarative
|
||||
qtlottie
|
||||
qtmultimedia
|
||||
qtquickcontrols
|
||||
qtquickcontrols2
|
||||
qtsvg
|
||||
qttools
|
||||
qtwebengine
|
||||
]);
|
||||
in pkgs.mkShell {
|
||||
name = "status-desktop-build-shell";
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
bash which curl wget git file unzip jq lsb-release
|
||||
go cmake gnumake pkg-config gnugrep qtCustom
|
||||
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;
|
||||
# https://github.com/NixOS/nixpkgs/pull/109649
|
||||
QT_INSTALL_PLUGINS = "${qtCustom}/${pkgs.qt515.qtbase.qtPluginPrefix}";
|
||||
|
||||
shellHook = ''
|
||||
export MAKEFLAGS="-j$NIX_BUILD_CORES"
|
||||
'';
|
||||
}
|
Loading…
Reference in New Issue