Pin down the current nixpkgs version.
parent
b8d73cc640
commit
7fb43a069b
|
@ -19,6 +19,5 @@
|
|||
# @end:license
|
||||
|
||||
let
|
||||
nixpkgs = import <nixpkgs> {};
|
||||
noisicaa = nixpkgs.callPackage ./noisicaa.nix {};
|
||||
noisicaa = import ./noisicaa.nix {};
|
||||
in noisicaa
|
||||
|
|
49
noisicaa.nix
49
noisicaa.nix
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
# @end:license
|
||||
|
||||
let
|
||||
nixpkgs = import <nixpkgs> {};
|
||||
noisicaa = nixpkgs.callPackage ./noisicaa.nix {
|
||||
nixpkgs = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/d14d83a3691121642be1b0579cf3408a83c558d7.tar.gz") {};
|
||||
noisicaa = import ./noisicaa.nix {
|
||||
withTests = true;
|
||||
};
|
||||
in nixpkgs.mkShell {
|
||||
|
@ -29,7 +29,6 @@ in nixpkgs.mkShell {
|
|||
];
|
||||
inputsFrom = [ noisicaa ];
|
||||
|
||||
# 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";
|
||||
inherit (noisicaa) QT_QPA_PLATFORM_PLUGIN_PATH;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue