nixpkgs/pkgs/tools/misc/inav-blackbox-tools/default.nix
Artturin e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
In preparation for the deprecation of `stdenv.isX`.

These shorthands are not conducive to cross-compilation because they
hide the platforms.

Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way

One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059

There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.

```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
2024-09-25 00:04:37 +03:00

36 lines
1,013 B
Nix

{ lib, stdenv, fetchFromGitHub, pkg-config, cairo }:
stdenv.mkDerivation rec {
pname = "inav-blackbox-tools";
version = "unstable-2021-04-22";
src = fetchFromGitHub {
owner = "iNavFlight";
repo = "blackbox-tools";
rev = "0109e2fb9b44d593e60bca4cef4098d83c55c373";
sha256 = "1rdlw74dqq0hahnka2w2pgvs172vway2x6v8byxl2s773l22k4ln";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ cairo ];
installPhase = ''
runHook preInstall
mkdir -p "$out/bin"
cp obj/{blackbox_decode,blackbox_render,encoder_testbed} "$out/bin"
runHook postInstall
'';
meta = with lib; {
description = "Tools for working with blackbox flight logs";
homepage = "https://github.com/inavflight/blackbox-tools";
license = licenses.gpl3Only;
maintainers = with maintainers; [ expipiplus1 ];
platforms = platforms.all;
broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/inav-blackbox-tools.x86_64-darwin
};
}