mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-28 15:54:32 +00:00
e0464e4788
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" ```
52 lines
968 B
Nix
52 lines
968 B
Nix
{
|
|
lib,
|
|
stdenv,
|
|
cmake,
|
|
rustPlatform,
|
|
pkg-config,
|
|
fetchFromGitHub,
|
|
atk,
|
|
gtk3,
|
|
glib,
|
|
openssl,
|
|
Security,
|
|
nix-update-script,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "whitebox_tools";
|
|
version = "2.4.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "jblindsay";
|
|
repo = "whitebox-tools";
|
|
rev = "v${version}";
|
|
hash = "sha256-kvtfEEydwonoDux1VbAxqrF/Hf8Qh8mhprYnROGOC6g=";
|
|
};
|
|
|
|
cargoHash = "sha256-6v/3b6BHh/n7M2ZhLVKRvv0Va2xbLUSsxUb5paOStbQ=";
|
|
|
|
buildInputs = [
|
|
atk
|
|
glib
|
|
gtk3
|
|
openssl
|
|
] ++ lib.optional stdenv.hostPlatform.isDarwin Security;
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
pkg-config
|
|
];
|
|
|
|
doCheck = false;
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
meta = {
|
|
homepage = "https://jblindsay.github.io/ghrg/WhiteboxTools/index.html";
|
|
description = "Advanced geospatial data analysis platform";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ mpickering ];
|
|
};
|
|
}
|