Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook }: 2 3stdenv.mkDerivation rec { 4 pname = "hashdeep"; 5 version = "4.4"; 6 7 src = fetchFromGitHub { 8 owner = "jessek"; 9 repo = "hashdeep"; 10 rev = "release-${version}"; 11 sha256 = "0m2b042ndikavmplv3qjdhfj44hl1h8car83c192xi9nv5ahi7mf"; 12 }; 13 14 patches = [ 15 (fetchpatch { 16 # Relevant link: <https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1512> 17 # Defect report fixed in GCC 11 18 # Search for "DR 1512" in <https://gcc.gnu.org/gcc-11/changes.html> 19 name = "fix-cpp-defect-report-1512.patch"; 20 url = "https://github.com/jessek/hashdeep/commit/6ef69a26126ee4e69a25392fd456b8a66c51dffd.patch"; 21 sha256 = "sha256-IrqcnrKINeoh56FR25FzSM1YJMkM2yFd/GwOeWGRLFo="; 22 }) 23 (fetchpatch { 24 # Fix the spacing between the string literals and macros, see https://github.com/jessek/hashdeep/pull/385 25 name = "string-literal-spacing.patch"; 26 url = "https://github.com/jessek/hashdeep/commit/18a6b5d57f7a648d2b7dcc6e50ff00a1e4b05fcc.patch"; 27 sha256 = "sha256-S6hzC8jPtG3ozsvVq5JfAUMwqKxytLGwBAtNYNr6RJ0="; 28 }) 29 ]; 30 31 nativeBuildInputs = [ autoreconfHook ]; 32 33 meta = with lib; { 34 description = "A set of cross-platform tools to compute hashes"; 35 homepage = "https://github.com/jessek/hashdeep"; 36 license = licenses.gpl2; 37 maintainers = [ maintainers.karantan ]; 38 platforms = platforms.all; 39 }; 40}