nix flakes support #64
@ -41,6 +41,7 @@
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgs.llvm ];
|
||||
|
||||
buildPhase = ''
|
||||
|
||||
cargo build --release --bin thermostat
|
||||
'';
|
||||
@ -69,7 +70,7 @@
|
||||
buildInputs = with pkgs; [
|
||||
rustPlatform.rust.rustc
|
||||
rustPlatform.rust.cargo
|
||||
sb10q
commented
gcc? gcc?
|
||||
gcc openocd dfu-util
|
||||
openocd dfu-util
|
||||
] ++ (with python3Packages; [
|
||||
sb10q
commented
Did you test this? I think this doesn't work and you need Did you test this? I think this doesn't work and you need ``python3.withPackages`` instead.
mwojcik
commented
Weirdly enough it seems to work
Weirdly enough it seems to work
```shell
❯ nix develop
[spaqin@hera:~/m-labs/thermostat]$ python
Python 3.9.6 (default, Jun 28 2021, 08:57:49)
[GCC 10.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> import matplotlib
>>>
```
sb10q
commented
This is the lab computer and those packages are already included in the system Python. You can use This is the lab computer and those packages are already included in the system Python. You can use ``nix develop --ignore-environment`` to isolate the system profile (see https://github.com/NixOS/nix/issues/4359).
mwojcik
commented
Still available:
Still available:
```shell
❯ nix develop --ignore-environment
bash-5.1$ python
Python 3.9.6 (default, Jun 28 2021, 08:57:49)
[GCC 10.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib
>>> import numpy
>>>
```
|
||||
numpy matplotlib
|
||||
]);
|
||||
|
Loading…
Reference in New Issue
Block a user
cargoBuildFlags?
Is there API of that function described somewhere for quick reference? Besides the little tutorial section...
Actually, using just cargoBuildFlags (
--bin thermostat
as release is already included) causes the build to fail, as the default builder forces--target=x86_64-linux
.One usually has to RTFS of nixpkgs for this kind of extended documentation :)
If there's no easy solution then overriding buildPhase is fine.