Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inav: init at 2.0.0-rc2; betaflight: 3.2.3 -> 3.4.0-rc4 #40978

Merged
merged 2 commits into from Aug 10, 2018

Conversation

elitak
Copy link
Contributor

@elitak elitak commented May 23, 2018

Motivation for this change

betaflight version bump and inav init (fork of betaflight with almost identical build)

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@@ -21,8 +19,8 @@ in stdenv.mkDerivation rec {
src = fetchFromGitHub {
owner = "betaflight";
repo = "betaflight";
rev = "v${version}";
sha256 = "0vbjyxfjxgpaiiwvj5bscrlfikzp3wnxpmc4sxcz5yw5mwb9g428";
rev = "041362614bac4aaed4c0e4cc163a1ba99139dfdc";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why stop using the version?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's because of the first line in postPatch; the short form of the revision is baked into the firmware images. If I use the tag, I will still need to store the commit id someplace, unless you know of a way to convert the tag to a commit id at build time, without pulling in any extra buildInputs. Is it cached someplace in the src derviation by the builder?

I'll add a note for now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't notice it was being used there. I looked into it some, but it doesn't look like there is a better solution than what you have, unless leaveDotGit works here. It looks like leaveDotGit has some issues of its own though #8567 (comment)

src = fetchFromGitHub {
owner = "iNavFlight";
repo = "inav";
rev = "03a5c1922a7c06e18d33de9d0cc09c709b37fcc6";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to use the version tag here too.

@elitak
Copy link
Contributor Author

elitak commented Jul 2, 2018

These commits are rather innocuous. Can I get some approval here?

@ryantm
Copy link
Member

ryantm commented Jul 2, 2018

Sorry, I didn't see you updated the branch (I don't think GitHub sends notifications for branch pushes.). Let's push this along.

@GrahamcOfBorg build betaflight inav

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: betaflight, inav

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: betaflight, inav

Partial log (click to expand)

/nix/store/bl2rcqq49gjzk2im4zhjz7j9m9whnvp5-gcc-arm-embedded-6-2017-q2-update/bin/arm-none-eabi-g++: line 1: �ELF����: not found
/nix/store/bl2rcqq49gjzk2im4zhjz7j9m9whnvp5-gcc-arm-embedded-6-2017-q2-update/bin/arm-none-eabi-g++: line 2: syntax error: unexpected "("
        from ./src/utils/build_stamp.rb:66:in `hash_config'
        from ./src/utils/build_stamp.rb:44:in `stamp'
        from ./src/utils/build_stamp.rb:89:in `<main>'
make[1]: *** [Makefile:311: obj/main/OMNIBUSF7/build.stamp] Error 1
make[1]: Leaving directory '/build/source'
make: *** [Makefile:379: OMNIBUSF7] Error 2
builder for '/nix/store/nsv67pcnrpbyplxvm5pigzmiqiisgqcx-inav-2.0.0-rc2.drv' failed with exit code 2
error: build of '/nix/store/31555n8jqd510h1n6r4yhvwv5cnfj9j7-betaflight-3.4.0-rc4.drv', '/nix/store/nsv67pcnrpbyplxvm5pigzmiqiisgqcx-inav-2.0.0-rc2.drv' failed

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: betaflight, inav

Partial log (click to expand)

make[1]: Leaving directory '/build/source'
Building YUPIF7 succeeded.
installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/1nprzcirihimv04jv9lwb5ykdvrvbrzr-betaflight-3.4.0-rc4
strip is /nix/store/4qvrxzxa535y8304mk195x50b6p9607d-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/1nprzcirihimv04jv9lwb5ykdvrvbrzr-betaflight-3.4.0-rc4
checking for references to /build in /nix/store/1nprzcirihimv04jv9lwb5ykdvrvbrzr-betaflight-3.4.0-rc4...
/nix/store/1nprzcirihimv04jv9lwb5ykdvrvbrzr-betaflight-3.4.0-rc4
/nix/store/ji2y33x0cc4nh5m6p08rgsjj8kswfngy-inav-2.0.0-rc2

@elitak
Copy link
Contributor Author

elitak commented Jul 2, 2018

I've removed those non-building platforms from meta

@ryantm
Copy link
Member

ryantm commented Jul 2, 2018

@GrahamcOfBorg build betaflight inav

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: betaflight, inav

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: betaflight, inav

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: betaflight, inav

Partial log (click to expand)

/nix/store/1nprzcirihimv04jv9lwb5ykdvrvbrzr-betaflight-3.4.0-rc4
/nix/store/ji2y33x0cc4nh5m6p08rgsjj8kswfngy-inav-2.0.0-rc2

@ryantm
Copy link
Member

ryantm commented Jul 3, 2018

Looks good to me

@elitak elitak changed the title inav: init at 1.9.1; betaflight: 3.2.3 -> 3.3.2 inav: init at 2.0.0-rc2; betaflight: 3.2.3 -> 3.4.0-rc4 Jul 3, 2018
Copy link
Member

@samueldr samueldr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have any hardware to validate this, but it built a bunch of things fine.

Love the work on the skipped targets. (Actually documenting what's wrong.)

LGTM

@samueldr samueldr merged commit c116b48 into NixOS:master Aug 10, 2018
@elitak elitak deleted the inav branch December 29, 2018 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants