nixpkgs/pkgs/by-name/ta/tartan/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

56 lines
1.2 KiB
Nix

{
stdenv,
lib,
fetchFromGitLab,
meson,
ninja,
pkg-config,
llvmPackages,
gobject-introspection,
glib,
unstableGitUpdater,
}:
stdenv.mkDerivation {
pname = "tartan";
version = "0.3.0-unstable-2023-10-11";
src = fetchFromGitLab {
domain = "gitlab.freedesktop.org";
owner = "tartan";
repo = "tartan";
rev = "4a7c945535d746d3d874ebebc0217715d674a862";
hash = "sha256-DYvbBGgytf1JOYKejZB+ReehD8iKm1n4BhMmLQURay0=";
};
nativeBuildInputs = [
meson
ninja
pkg-config
];
buildInputs = [
gobject-introspection
glib
llvmPackages.libclang
llvmPackages.libllvm
];
passthru = {
updateScript = unstableGitUpdater {
# The updater tries src.url by default, which does not exist for fetchFromGitLab (fetchurl).
url = "https://gitlab.freedesktop.org/tartan/tartan.git";
};
};
meta = with lib; {
broken = stdenv.hostPlatform.isDarwin;
description = "Tools and Clang plugins for developing code with GLib";
homepage = "https://gitlab.freedesktop.org/tartan/tartan";
changelog = "https://gitlab.freedesktop.org/tartan/tartan/-/blob/main/NEWS";
license = licenses.gpl3Plus;
platforms = platforms.unix;
maintainers = with maintainers; [ jtojnar ];
};
}