|
|
|
@ -18,24 +18,14 @@
|
|
|
|
|
#
|
|
|
|
|
# @end:license
|
|
|
|
|
|
|
|
|
|
{ lib,
|
|
|
|
|
stdenv,
|
|
|
|
|
fetchFromGitHub,
|
|
|
|
|
python38,
|
|
|
|
|
python38Packages,
|
|
|
|
|
lcov,
|
|
|
|
|
cmake,
|
|
|
|
|
wafHook,
|
|
|
|
|
pkg-config,
|
|
|
|
|
gtest,
|
|
|
|
|
protobuf,
|
|
|
|
|
grpc,
|
|
|
|
|
libjack2,
|
|
|
|
|
ffmpeg,
|
|
|
|
|
fmt,
|
|
|
|
|
withTests ? false
|
|
|
|
|
{ withTests ? false
|
|
|
|
|
}:
|
|
|
|
|
let
|
|
|
|
|
nixpkgs = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/d14d83a3691121642be1b0579cf3408a83c558d7.tar.gz") {};
|
|
|
|
|
lib = nixpkgs.lib;
|
|
|
|
|
stdenv = nixpkgs.stdenv;
|
|
|
|
|
fetchFromGitHub = nixpkgs.fetchFromGitHub;
|
|
|
|
|
|
|
|
|
|
# mach-nix: Create highly reproducible python environments
|
|
|
|
|
# https://github.com/DavHau/mach-nix
|
|
|
|
|
mach-nix = import (builtins.fetchGit {
|
|
|
|
@ -60,7 +50,7 @@ let
|
|
|
|
|
# system libraries are missing. Using the nixpkgs provider seems to work, but requires building
|
|
|
|
|
# Qt5 from source.
|
|
|
|
|
providers.pyside2 = "nixpkgs";
|
|
|
|
|
_.pyside2.buildInputs.add = [ python38Packages.shiboken2 ];
|
|
|
|
|
_.pyside2.buildInputs.add = [ nixpkgs.python38Packages.shiboken2 ];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# gitignoreSource: Nix functions for filtering local git sources
|
|
|
|
@ -86,7 +76,7 @@ let
|
|
|
|
|
sha256 = "sha256:1j2l5nm4lhkfymhv5qd5gi8760df7khvdvw174lzc9fjzs3a42af";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
nativeBuildInputs = [cmake python38];
|
|
|
|
|
nativeBuildInputs = [nixpkgs.cmake nixpkgs.python38];
|
|
|
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
|
patchShebangs test/dependencies/cxxtest/bin/cxxtestgen
|
|
|
|
@ -137,7 +127,7 @@ let
|
|
|
|
|
sha256 = "sha256:1a7cj068vap1m3sq9wvzyjjj0vgnk7bxm18mfwvvadl68yh9ij1f";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
nativeBuildInputs = [ nixpkgs.cmake ];
|
|
|
|
|
|
|
|
|
|
cmakeFlags = [ "-DFLATBUFFERS_BUILD_TESTS=OFF" ];
|
|
|
|
|
doCheck = false;
|
|
|
|
@ -151,20 +141,23 @@ in stdenv.mkDerivation {
|
|
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
|
python
|
|
|
|
|
wafHook
|
|
|
|
|
pkg-config
|
|
|
|
|
protobuf
|
|
|
|
|
nixpkgs.wafHook
|
|
|
|
|
nixpkgs.pkg-config
|
|
|
|
|
nixpkgs.protobuf
|
|
|
|
|
flatbuffers
|
|
|
|
|
grpc
|
|
|
|
|
libjack2
|
|
|
|
|
nixpkgs.grpc
|
|
|
|
|
nixpkgs.libjack2
|
|
|
|
|
subprocess
|
|
|
|
|
ffmpeg.dev
|
|
|
|
|
nixpkgs.ffmpeg.dev
|
|
|
|
|
dep_sort
|
|
|
|
|
fmt
|
|
|
|
|
nixpkgs.fmt
|
|
|
|
|
] ++ lib.lists.optional withTests [
|
|
|
|
|
gtest.dev
|
|
|
|
|
lcov
|
|
|
|
|
nixpkgs.gtest.dev
|
|
|
|
|
nixpkgs.lcov
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
wafConfigureFlags = if withTests then "--with-tests" else "--without-tests";
|
|
|
|
|
|
|
|
|
|
# https://discourse.nixos.org/t/how-can-i-build-a-python-package-that-uses-qt/7657
|
|
|
|
|
QT_QPA_PLATFORM_PLUGIN_PATH="${nixpkgs.qt5.qtbase.bin}/lib/qt-${nixpkgs.qt5.qtbase.version}/plugins";
|
|
|
|
|
}
|
|
|
|
|