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" ```
44 lines
868 B
Nix
44 lines
868 B
Nix
{ lib
|
|
, rustPlatform
|
|
, fetchFromGitHub
|
|
, pkg-config
|
|
, oniguruma
|
|
, stdenv
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "boxxy";
|
|
version = "0.8.5";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "queer";
|
|
repo = "boxxy";
|
|
rev = "v${version}";
|
|
hash = "sha256-6pb3yyC4/kpe8S67B3pzsSu3PfQyOWpiYi0JTBQk3lU=";
|
|
};
|
|
|
|
cargoHash = "sha256-PaH0WBBGK37T59RU4ofL0XjYX3cV5lR7WmCw+H/MeuA=";
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
];
|
|
|
|
buildInputs = [
|
|
oniguruma
|
|
];
|
|
|
|
env = {
|
|
RUSTONIG_SYSTEM_LIBONIG = true;
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Puts bad Linux applications in a box with only their files";
|
|
homepage = "https://github.com/queer/boxxy";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ dit7ya figsoda ];
|
|
platforms = platforms.linux;
|
|
broken = stdenv.hostPlatform.isAarch64;
|
|
mainProgram = "boxxy";
|
|
};
|
|
}
|