mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-12 07:54:50 +00:00
255c80e191
This came up in review of PR #198456 and should make overriding more consistent. Co-authored-by: Anderson Torres <torres.anderson.85@protonmail.com>
32 lines
844 B
Nix
32 lines
844 B
Nix
{ lib, stdenv, fetchFromGitHub, openmp ? null }:
|
|
|
|
with lib;
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "b2sum";
|
|
version = "20190724";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "BLAKE2";
|
|
repo = "BLAKE2";
|
|
rev = finalAttrs.version;
|
|
sha256 = "sha256-6BVl3Rh+CRPQq3QxcUlk5ArvjIj/IcPCA2/Ok0Zu7UI=";
|
|
};
|
|
|
|
sourceRoot = "source/b2sum";
|
|
|
|
buildInputs = [ openmp ];
|
|
|
|
buildFlags = [ (optional (openmp == null) "NO_OPENMP=1") ];
|
|
installFlags = [ "PREFIX=$(out)" ];
|
|
|
|
meta = {
|
|
description = "The b2sum utility is similar to the md5sum or shasum utilities but for BLAKE2";
|
|
homepage = "https://blake2.net";
|
|
license = with licenses; [ asl20 cc0 openssl ];
|
|
maintainers = with maintainers; [ kirelagin ];
|
|
# "This code requires at least SSE2."
|
|
platforms = [ "x86_64-linux" "i686-linux" ] ++ platforms.darwin;
|
|
};
|
|
})
|