nixpkgs/pkgs/by-name/ha/hashrat/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

44 lines
1.2 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
}:
stdenv.mkDerivation rec {
pname = "hashrat";
version = "1.22";
src = fetchFromGitHub {
owner = "ColumPaget";
repo = "Hashrat";
rev = "v${version}";
hash = "sha256-mjjK315OUUFVdUY+zcCvm7yeo7XxourR1sghWbeFT7c=";
};
patches = [
# fix cross compilation by replacing hardcoded ar with AC_PROG_AR
# https://github.com/ColumPaget/Hashrat/pull/27
(fetchpatch {
url = "https://github.com/ColumPaget/Hashrat/commit/a82615e02021245850a1703e613055da2520c8fd.patch";
hash = "sha256-tjyhM2ahZBRoRP8WjyQhrI3l20oaqMtfYmOeAZVEZqU=";
})
];
configureFlags = [ "--enable-xattr" ];
makeFlags = [ "PREFIX=$(out)" ];
meta = with lib; {
description = "Command-line hash-generation utility";
mainProgram = "hashrat";
longDescription = ''
Hashing tool supporting md5,sha1,sha256,sha512,whirlpool,jh and hmac versions of these.
Includes recursive file hashing and other features.
'';
homepage = "http://www.cjpaget.co.uk/Code/Hashrat";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ zendo ];
};
}