mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-05 05:13:04 +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" ```
49 lines
1.1 KiB
Nix
49 lines
1.1 KiB
Nix
{
|
|
darwin,
|
|
fetchCrate,
|
|
iconv,
|
|
lib,
|
|
openssl,
|
|
pkg-config,
|
|
rustPlatform,
|
|
stdenv,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "gitlab-timelogs";
|
|
version = "0.4.0";
|
|
|
|
src = fetchCrate {
|
|
inherit pname version;
|
|
hash = "sha256-EWFzMNuNquHR0grmmi14vuraIwvrmkw88QAYkvbO2QM=";
|
|
};
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
buildInputs =
|
|
[ openssl ]
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
darwin.apple_sdk.frameworks.SystemConfiguration
|
|
iconv
|
|
];
|
|
|
|
cargoHash = "sha256-IXiIrX+nR7uB7UYqdVgKR+IHJlRl0i0cklwITGF5jAg=";
|
|
|
|
meta = {
|
|
description = " CLI utility to support you with your time logs in GitLab";
|
|
mainProgram = "gitlab-timelogs";
|
|
longDescription = ''
|
|
CLI utility to support you with your time logs in GitLab.
|
|
|
|
gitlab-timelogs is not associated with the official GitLab project!
|
|
'';
|
|
homepage = "https://github.com/phip1611/gitlab-timelogs";
|
|
changelog = "https://github.com/phip1611/gitlab-timelogs/blob/v${version}/CHANGELOG.md";
|
|
license = with lib.licenses; [ mit ];
|
|
maintainers = with lib.maintainers; [
|
|
blitz
|
|
phip1611
|
|
];
|
|
};
|
|
}
|