diff --git a/pkgs/tools/compression/lz4/default.nix b/pkgs/tools/compression/lz4/default.nix index 72a822fdae88..8b530025811c 100644 --- a/pkgs/tools/compression/lz4/default.nix +++ b/pkgs/tools/compression/lz4/default.nix @@ -2,22 +2,24 @@ , valgrind }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "lz4"; version = "1.9.4"; src = fetchFromGitHub { - sha256 = "sha256-YiMCD3vvrG+oxBUghSrCmP2LAfAGZrEaKz0YoaQJhpI="; - rev = "v${version}"; - repo = pname; - owner = pname; + repo = "lz4"; + owner = "lz4"; + rev = "v${finalAttrs.version}"; + hash = "sha256-YiMCD3vvrG+oxBUghSrCmP2LAfAGZrEaKz0YoaQJhpI="; }; nativeBuildInputs = [ cmake ]; - buildInputs = lib.optional finalAttrs.doCheck valgrind; + buildInputs = lib.optionals finalAttrs.doCheck [ + valgrind + ]; # TODO(@Ericson2314): Separate binaries and libraries outputs = [ "bin" "out" "dev" ]; @@ -26,7 +28,7 @@ stdenv.mkDerivation rec { (fetchpatch { # https://github.com/lz4/lz4/pull/1162 name = "build-shared-no.patch"; url = "https://github.com/lz4/lz4/commit/851ef4b23c7cbf4ceb2ba1099666a8b5ec4fa195.patch"; - sha256 = "sha256-P+/uz3m7EAmHgXF/1Vncc0uKKxNVq6HNIsElx0rGxpw="; + hash = "sha256-P+/uz3m7EAmHgXF/1Vncc0uKKxNVq6HNIsElx0rGxpw="; }) ]; @@ -49,4 +51,4 @@ stdenv.mkDerivation rec { license = with licenses; [ bsd2 gpl2Plus ]; platforms = platforms.all; }; -} +})