mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-24 06:33:42 +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" ```
46 lines
1.3 KiB
Nix
46 lines
1.3 KiB
Nix
{ lib
|
|
, rustPlatform
|
|
, fetchFromGitHub
|
|
, openssl
|
|
, pkg-config
|
|
, stdenv
|
|
, Security
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "krill";
|
|
version = "0.14.5";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "NLnetLabs";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-3pkDu20vgzslJcK5KQH+GY+jnimEZgm+bQxy8QMUeCk=";
|
|
};
|
|
|
|
cargoHash = "sha256-Z12fUK4TUgk38/vNAt8RWLFGLc8WnZAgHWz0xl1QKLI=";
|
|
|
|
buildInputs = [ openssl ] ++ lib.optional stdenv.hostPlatform.isDarwin Security;
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
# Needed to get openssl-sys to use pkgconfig.
|
|
OPENSSL_NO_VENDOR = 1;
|
|
|
|
# disable failing tests on darwin
|
|
doCheck = !stdenv.hostPlatform.isDarwin;
|
|
|
|
meta = with lib; {
|
|
description = "RPKI Certificate Authority and Publication Server written in Rust";
|
|
longDescription = ''
|
|
Krill is a free, open source RPKI Certificate Authority that lets you run
|
|
delegated RPKI under one or multiple Regional Internet Registries (RIRs).
|
|
Through its built-in publication server, Krill can publish Route Origin
|
|
Authorisations (ROAs) on your own servers or with a third party.
|
|
'';
|
|
homepage = "https://github.com/NLnetLabs/krill";
|
|
changelog = "https://github.com/NLnetLabs/krill/releases/tag/v${version}";
|
|
license = licenses.mpl20;
|
|
maintainers = with maintainers; [ steamwalker ];
|
|
};
|
|
}
|