build
This commit is contained in:
parent
5f9537bccc
commit
3de4d0155e
36
default.nix
36
default.nix
@ -5,44 +5,20 @@ let
|
|||||||
] ++ (with builtins; map (d: getAttr d python-packages) (filter (d: stringLength d > 0) (pkgs.lib.splitString "\n" (builtins.readFile ./tools/requirements.txt))))));
|
] ++ (with builtins; map (d: getAttr d python-packages) (filter (d: stringLength d > 0) (pkgs.lib.splitString "\n" (builtins.readFile ./tools/requirements.txt))))));
|
||||||
python-with-my-packages = pkgs.python3.withPackages pyPackages;
|
python-with-my-packages = pkgs.python3.withPackages pyPackages;
|
||||||
src = ./.;
|
src = ./.;
|
||||||
tinycbor = with pkgs; stdenv.mkDerivation {
|
|
||||||
name = "tinycbor";
|
|
||||||
src = "${src}/tinycbor";
|
|
||||||
makeFlags = [ "PREFIX=$(out)" "prefix=$(out)" ];
|
|
||||||
buildInputs = [ gcc gcc-arm-embedded-8 ];
|
|
||||||
};
|
|
||||||
standalone = with pkgs; stdenv.mkDerivation {
|
|
||||||
name = "solo-standalone";
|
|
||||||
src = [
|
|
||||||
src
|
|
||||||
tinycbor
|
|
||||||
];
|
|
||||||
buildInputs = [ gnumake gcc gcc-arm-embedded-8 python-with-my-packages ];
|
|
||||||
installPhase = ''
|
|
||||||
make clean
|
|
||||||
make all PREFIX=$(out)" "prefix=$(out)
|
|
||||||
mkdir -p $out/bin
|
|
||||||
cp main $out/bin/
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
with pkgs; stdenv.mkDerivation {
|
with pkgs; stdenv.mkDerivation {
|
||||||
name = "solo";
|
name = "solo";
|
||||||
outputs = [ "out" "firmware" ];
|
outputs = [ "out" ];
|
||||||
src = builtins.filterSource (path: type: (!(lib.hasSuffix path "./tinycbor/lib") && !(lib.hasSuffix path ".hex")&& !(lib.hasSuffix path ".sha256")&& !(lib.hasSuffix path ".elf"))) ./.;
|
src = with lib; builtins.filterSource (path: type: !(hasSuffix path "hex" || hasSuffix path "sha256")) src;
|
||||||
buildInputs = [ gnumake gcc gcc-arm-embedded-8 git python-with-my-packages ];
|
buildInputs = [ gnumake gcc gcc-arm-embedded-8 git python-with-my-packages ];
|
||||||
########installPhase = ''
|
phases = [ "unpackPhase" "configurePhase" "buildPhase" "installPhase" ];
|
||||||
######## mkdir -p $firmware $standalone/bin/
|
|
||||||
######## cp main $standalone/bin/
|
|
||||||
######## cd stm32l432
|
|
||||||
######## make firmware
|
|
||||||
######## cp *.hex *.sha256 *.elf cubeconfig_stm32l442.ioc $firmware/
|
|
||||||
########'';
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
mkdir -p $out/firmware $out
|
||||||
cd targets/stm32l432
|
cd targets/stm32l432
|
||||||
make cbor
|
make cbor
|
||||||
make build-hacker
|
make build-hacker
|
||||||
cp *.hex *.sha256 *.elf cubeconfig_stm32l442.ioc $firmware/
|
cp *.hex *.sha256 *.elf cubeconfig_stm32l442.ioc $out/firmware/
|
||||||
'';
|
'';
|
||||||
|
keepDebugInfo = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user