mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 21:03:15 +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" ```
89 lines
2.2 KiB
Nix
89 lines
2.2 KiB
Nix
{ lib
|
|
, stdenv
|
|
, rustPlatform
|
|
, fetchFromGitHub
|
|
, cmake
|
|
, pkg-config
|
|
, wrapGAppsHook3
|
|
, libglvnd
|
|
, libxkbcommon
|
|
, openssl
|
|
, nix-update-script
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "ukmm";
|
|
version = "0.15.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "NiceneNerd";
|
|
repo = "ukmm";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-NZN+T2N+N+oxrjBRvVbRWbB2KY5im9SN7gPHzfvovl8=";
|
|
};
|
|
|
|
cargoLock = {
|
|
lockFile = ./Cargo.lock;
|
|
outputHashes = {
|
|
"egui-aesthetix-0.2.4" = "sha256-6Nt+nx1pAkuehXINRLp8xgiXmq1PzWgtu/hVbcDm5iA=";
|
|
"junction-0.2.0" = "sha256-6+pPp5wG1NoIj16Z+OvO4Pvy0jnQibn/A9cTaHAEVq4=";
|
|
"msbt-0.1.1" = "sha256-PtBs60xgYrwS7yPnRzXpExwYUD3azIaqObRnnJEL5dE=";
|
|
"msyt-1.2.1" = "sha256-aw5whCoQBhO0u9Fx2rTO1sRuPdGnAAlmPWv5q8CbQcI=";
|
|
};
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
pkg-config
|
|
wrapGAppsHook3
|
|
];
|
|
|
|
buildInputs = [
|
|
libglvnd
|
|
libxkbcommon
|
|
openssl
|
|
];
|
|
|
|
# Force linking to libEGL, which is always dlopen()ed, and to
|
|
# libwayland-client & libxkbcommon, which is dlopen()ed based on the
|
|
# winit backend.
|
|
RUSTFLAGS = map (a: "-C link-arg=${a}") [
|
|
"-Wl,--push-state,--no-as-needed"
|
|
"-lEGL"
|
|
"-lwayland-client"
|
|
"-lxkbcommon"
|
|
"-Wl,--pop-state"
|
|
];
|
|
|
|
cargoTestFlags = [
|
|
"--all"
|
|
];
|
|
|
|
checkFlags = [
|
|
# Requires a game dump of Breath of the Wild
|
|
"--skip=gui::tasks::tests::remerge"
|
|
"--skip=pack::tests::pack_mod"
|
|
"--skip=project::tests::project_from_mod"
|
|
"--skip=tests::read_meta"
|
|
"--skip=unpack::tests::read_mod"
|
|
"--skip=unpack::tests::unpack_mod"
|
|
"--skip=unpack::tests::unzip_mod"
|
|
|
|
# Requires Clear Camera mod
|
|
"--skip=bnp::test_convert"
|
|
];
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
meta = with lib; {
|
|
description = "New mod manager for The Legend of Zelda: Breath of the Wild";
|
|
homepage = "https://github.com/NiceneNerd/ukmm";
|
|
changelog = "https://github.com/NiceneNerd/ukmm/blob/${src.rev}/CHANGELOG.md";
|
|
license = licenses.gpl3Plus;
|
|
maintainers = with maintainers; [ kira-bruneau ];
|
|
platforms = platforms.linux;
|
|
broken = stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64;
|
|
mainProgram = "ukmm";
|
|
};
|
|
}
|