mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 08:23:09 +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" ```
43 lines
975 B
Nix
43 lines
975 B
Nix
{ git
|
|
, lib
|
|
, libgit2
|
|
, rustPlatform
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
}:
|
|
let
|
|
inherit
|
|
(lib)
|
|
licenses
|
|
maintainers
|
|
;
|
|
|
|
version = "0.2.7";
|
|
in
|
|
rustPlatform.buildRustPackage {
|
|
pname = "git-instafix";
|
|
inherit version;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "quodlibetor";
|
|
repo = "git-instafix";
|
|
rev = "v${version}";
|
|
hash = "sha256-Uz+KQ8cQT3v97EtmbAv2II30dUrFD0hMo/GhnqcdBOs=";
|
|
};
|
|
|
|
cargoHash = "sha256-12UkZyyu4KH3dcCadr8UhK8DTtVjcsjYzt7kiNLpUqU=";
|
|
|
|
buildInputs = [ libgit2 ];
|
|
nativeCheckInputs = [ git ];
|
|
|
|
meta = {
|
|
description = "Quickly fix up an old commit using your currently-staged changes";
|
|
mainProgram = "git-instafix";
|
|
homepage = "https://github.com/quodlibetor/git-instafix";
|
|
license = with licenses; [ mit asl20 ];
|
|
maintainers = with maintainers; [ mightyiam quodlibetor ];
|
|
changelog = "https://github.com/quodlibetor/git-instafix/releases/tag/v${version}";
|
|
broken = stdenv.hostPlatform.isDarwin;
|
|
};
|
|
}
|