mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +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" ```
66 lines
1.4 KiB
Nix
66 lines
1.4 KiB
Nix
{
|
|
lib,
|
|
rustPlatform,
|
|
fetchFromGitHub,
|
|
pkg-config,
|
|
stdenv,
|
|
curl,
|
|
installShellFiles,
|
|
libgit2,
|
|
libssh2,
|
|
openssl,
|
|
zlib,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage {
|
|
pname = "git-series";
|
|
version = "0.9.1-unstable-2024-02-02";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "git-series";
|
|
repo = "git-series";
|
|
rev = "9c5d40edec87b79db0c5bac1458aa0e2c8fdeb8e";
|
|
hash = "sha256-DtOR7+vX7efNzYMRJwJTj5cXlFHQwzcS0Gp2feVdea4=";
|
|
};
|
|
|
|
cargoHash = "sha256-D83mfaH4iKagGjdX+YhCzva99+dCneHeWPNnkzZB/k0=";
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
installShellFiles
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ curl ];
|
|
|
|
buildInputs = [
|
|
libgit2
|
|
libssh2
|
|
openssl
|
|
zlib
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ curl ];
|
|
|
|
env = {
|
|
LIBGIT2_SYS_USE_PKG_CONFIG = true;
|
|
LIBSSH2_SYS_USE_PKG_CONFIG = true;
|
|
};
|
|
|
|
postInstall = ''
|
|
installManPage ./git-series.1
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Tool to help with formatting git patches for review on mailing lists";
|
|
longDescription = ''
|
|
git series tracks changes to a patch series over time. git
|
|
series also tracks a cover letter for the patch series,
|
|
formats the series for email, and prepares pull requests.
|
|
'';
|
|
homepage = "https://github.com/git-series/git-series";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [
|
|
edef
|
|
vmandela
|
|
aleksana
|
|
];
|
|
mainProgram = "git-series";
|
|
};
|
|
}
|