nixpkgs/pkgs/by-name/na/naja/package.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

76 lines
1.4 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
cmake,
bison,
boost,
capnproto,
doxygen,
flex,
libdwarf-lite,
pkg-config,
python3,
tbb_2021_11,
}:
stdenv.mkDerivation {
pname = "naja";
version = "0-unstable-2024-08-27";
src = fetchFromGitHub {
owner = "najaeda";
repo = "naja";
rev = "ca7a544d16abb31d6992e702ccbd97be3a644c08";
hash = "sha256-lmgXv2nmmjKph0Tf9ZvV3kQBtbiGXYA7jrE77cgM+KU=";
fetchSubmodules = true;
};
outputs = [
"out"
"lib"
"dev"
];
strictDeps = true;
nativeBuildInputs = [
bison
capnproto
cmake
doxygen
flex
pkg-config
python3
];
buildInputs = [
boost
capnproto # cmake modules
flex # include dir
libdwarf-lite
tbb_2021_11
];
cmakeFlags =
[
(lib.cmakeBool "CPPTRACE_USE_EXTERNAL_LIBDWARF" true)
(lib.cmakeBool "CPPTRACE_USE_EXTERNAL_ZSTD" true)
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
(lib.cmakeFeature "CMAKE_OSX_DEPLOYMENT_TARGET" "10.14") # For aligned allocation
];
doCheck = true;
meta = {
description = "Structural Netlist API (and more) for EDA post synthesis flow development";
homepage = "https://github.com/najaeda/naja";
license = lib.licenses.asl20;
maintainers = [
# maintained by the team working on NGI-supported software, no group for this yet
];
mainProgram = "naja_edit";
platforms = lib.platforms.all;
};
}