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" ```
59 lines
1.3 KiB
Nix
59 lines
1.3 KiB
Nix
{ stdenv
|
|
, fetchFromGitLab
|
|
, lib
|
|
, darwin
|
|
, nettle
|
|
, nix-update-script
|
|
, rustPlatform
|
|
, pkg-config
|
|
, pcsclite
|
|
, openssl
|
|
, gnupg
|
|
, sqlite
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "openpgp-ca";
|
|
version = "0.14.0";
|
|
|
|
src = fetchFromGitLab {
|
|
owner = "openpgp-ca";
|
|
repo = "openpgp-ca";
|
|
rev = "openpgp-ca/v${version}";
|
|
hash = "sha256-71SApct2yQV3ueWDlZv7ScK1s0nWWS57cPCvoMutlLA=";
|
|
};
|
|
|
|
cargoHash = "sha256-L0Z+Oxov0y+PipdXz8/3Y0MKYhr/lNYurphc9s0K+Dg=";
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
rustPlatform.bindgenHook
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
gnupg
|
|
];
|
|
|
|
buildInputs = [
|
|
openssl
|
|
sqlite
|
|
pcsclite
|
|
nettle
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ PCSC Security SystemConfiguration ]);
|
|
|
|
# Most tests rely on gnupg being able to write to /run/user
|
|
# gnupg refuses to respect the XDG_RUNTIME_DIR variable, so we skip the tests
|
|
doCheck = false;
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
meta = with lib; {
|
|
description = "Tool for managing OpenPGP keys within organizations";
|
|
homepage = "https://openpgp-ca.org/";
|
|
changelog = "https://openpgp-ca.org/doc/changelog/";
|
|
license = licenses.gpl3Plus;
|
|
maintainers = with maintainers; [ cherrykitten ];
|
|
mainProgram = "oca";
|
|
};
|
|
}
|