mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 00:12:56 +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" ```
47 lines
991 B
Nix
47 lines
991 B
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitea
|
|
, guile
|
|
, libgcrypt
|
|
, autoreconfHook
|
|
, pkg-config
|
|
, texinfo
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "guile-gcrypt";
|
|
version = "0.4.0";
|
|
|
|
src = fetchFromGitea {
|
|
domain = "notabug.org";
|
|
owner = "cwebber";
|
|
repo = "guile-gcrypt";
|
|
rev = "v${version}";
|
|
hash = "sha256-vbm31EsOJiMeTs2tu5KPXckxPcAQbi3/PGJ5EHCC5VQ=";
|
|
};
|
|
|
|
strictDeps = true;
|
|
nativeBuildInputs = [
|
|
autoreconfHook guile libgcrypt pkg-config texinfo
|
|
];
|
|
buildInputs = [
|
|
guile
|
|
];
|
|
propagatedBuildInputs = [
|
|
libgcrypt
|
|
];
|
|
makeFlags = [ "GUILE_AUTO_COMPILE=0" ];
|
|
doCheck = true;
|
|
|
|
# In procedure bytevector-u8-ref: Argument 2 out of range
|
|
dontStrip = stdenv.hostPlatform.isDarwin;
|
|
|
|
meta = with lib; {
|
|
description = "Bindings to Libgcrypt for GNU Guile";
|
|
homepage = "https://notabug.org/cwebber/guile-gcrypt";
|
|
license = licenses.gpl3Plus;
|
|
maintainers = with maintainers; [ ethancedwards8 ];
|
|
platforms = guile.meta.platforms;
|
|
};
|
|
}
|