mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-11-05 17:56:46 +01:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
42 lines
1.3 KiB
Nix
42 lines
1.3 KiB
Nix
{ lib, stdenv, fetchurl }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "tthsum";
|
|
version = "1.3.2";
|
|
|
|
src = fetchurl {
|
|
url = "http://tthsum.devs.nu/pkg/tthsum-${version}.tar.bz2";
|
|
sha256 = "0z6jq8lbg9rasv98kxfs56936dgpgzsg3yc9k52878qfw1l2bp59";
|
|
};
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/bin $out/share/man/man1
|
|
cp share/tthsum.1.gz $out/share/man/man1
|
|
cp obj-unix/tthsum $out/bin
|
|
'';
|
|
|
|
doCheck = !stdenv.isDarwin;
|
|
|
|
meta = with lib; {
|
|
description = "An md5sum-alike program that works with Tiger/THEX hashes";
|
|
longDescription = ''
|
|
tthsum generates or checks TTH checksums (root of the THEX hash
|
|
tree). The Merkle Hash Tree, invented by Ralph Merkle, is a hash
|
|
construct that exhibits desirable properties for verifying the
|
|
integrity of files and file subranges in an incremental or
|
|
out-of-order fashion. tthsum uses the Tiger hash algorithm for
|
|
both the internal and the leaf nodes.
|
|
|
|
The specification of the Tiger hash algorithm is at:
|
|
http://www.cs.technion.ac.il/~biham/Reports/Tiger/
|
|
|
|
The specification of the THEX algorithm is at:
|
|
http://adc.sourceforge.net/draft-jchapweske-thex-02.html
|
|
'';
|
|
homepage = "http://tthsum.devs.nu/";
|
|
license = licenses.gpl3Plus;
|
|
maintainers = [ maintainers.ebzzry ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|