lol

b2sum: use fetchzip, clean up

authored by

Yegor Timoshenko and committed by
GitHub
dbdbdaf1 121c264c

+11 -9
+11 -9
pkgs/tools/security/b2sum/default.nix
··· 1 - { stdenv, fetchurl, openmp ? null }: 1 + { stdenv, fetchzip, openmp ? null }: 2 + 3 + with stdenv.lib; 2 4 3 5 stdenv.mkDerivation rec { 4 - version = "unstable-2018-06-11"; 5 - rev = "320c325437539ae91091ce62efec1913cd8093c2"; 6 6 name = "b2sum-${version}"; 7 + version = "unstable-2018-06-11"; 7 8 8 - src = fetchurl { 9 - url = "https://github.com/BLAKE2/BLAKE2/archive/${rev}.tar.gz"; 10 - sha256 = "19f07dwli9ymlc87ikn84j4h5fv57afwj9ni7s0jkaym5l0q6nqw"; 9 + src = fetchzip { 10 + url = "https://github.com/BLAKE2/BLAKE2/archive/320c325437539ae91091ce62efec1913cd8093c2.tar.gz"; 11 + sha256 = "0agmc515avdpr64bsgv87wby2idm0d3wbndxzkhdfjgzhgv0rb8k"; 11 12 }; 12 - postUnpack = "sourceRoot=$sourceRoot/b2sum"; 13 + 14 + sourceRoot = "source/b2sum"; 13 15 14 16 buildInputs = [ openmp ]; 15 17 16 - makeFlags = stdenv.lib.optional (isNull openmp) "NO_OPENMP=1"; 18 + buildFlags = [ (optional (isNull openmp) "NO_OPENMP=1") ]; 17 19 installFlags = [ "PREFIX=$(out)" ]; 18 20 19 - meta = with stdenv.lib; { 21 + meta = { 20 22 description = "The b2sum utility is similar to the md5sum or shasum utilities but for BLAKE2"; 21 23 homepage = "https://blake2.net"; 22 24 license = with licenses; [ asl20 cc0 openssl ];