Introduce a Nix derivation

This permits any user running NixOS to run `nix-build` to install all dependencies and build the local tree.
This commit is contained in:
Charles Duffy 2019-04-27 17:53:05 -05:00
parent 0b6c383506
commit 872e92bb87

25
default.nix Normal file
View File

@ -0,0 +1,25 @@
let
pkgs = import <nixpkgs> {};
in with pkgs; with pkgs.stdenv; mkDerivation {
name = "gr-air-modes";
src = ./.;
buildInputs = [
boost
cmake
gcc
gnumake
gnuradio
pkgconfig
qwt
swig
(python27.withPackages(ps: [ps.pyqt4 ps.numpy ps.pyzmq]))
];
nativeBuildInputs = [ makeWrapper ];
configurePhase = ''
cmake -DCMAKE_INSTALL_PREFIX=$out
'';
postFixup = ''
wrapProgram $out/bin/modes_gui --prefix PYTHONPATH : "$out/lib/python2.7/site-packages:$PYTHONPATH"
wrapProgram $out/bin/modes_rx --prefix PYTHONPATH : "$out/lib/python2.7/site-packages:$PYTHONPATH"
'';
}