nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 50 lines 1.1 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 fetchYarnDeps, 6 yarnConfigHook, 7 yarnBuildHook, 8 yarnInstallHook, 9 nodejs, 10 nix-update-script, 11}: 12 13stdenv.mkDerivation (finalAttrs: { 14 pname = "diff2html-cli"; 15 version = "5.2.15"; 16 17 src = fetchFromGitHub { 18 owner = "rtfpessoa"; 19 repo = "diff2html-cli"; 20 rev = finalAttrs.version; 21 hash = "sha256-aQoWn5n+xpYjhDQjw9v5HzWf/Hhmm6AK22OG4Ugq6Gk="; 22 }; 23 24 postPatch = '' 25 substituteInPlace package.json \ 26 --replace-fail "4.2.1" "${finalAttrs.version}"; 27 ''; 28 29 yarnOfflineCache = fetchYarnDeps { 30 inherit (finalAttrs) src; 31 hash = "sha256-9JkzWhsXUrjnMcDDJfqm+tZ+WV5j3CHJbpn9j7v/KLg="; 32 }; 33 34 nativeBuildInputs = [ 35 yarnConfigHook 36 yarnBuildHook 37 yarnInstallHook 38 nodejs 39 ]; 40 41 passthru.updateScript = nix-update-script { }; 42 43 meta = { 44 description = "Generate pretty HTML diffs from unified and git diff output in your terminal"; 45 homepage = "https://diff2html.xyz#cli"; 46 license = lib.licenses.mit; 47 maintainers = with lib.maintainers; [ pyrox0 ]; 48 mainProgram = "diff2html"; 49 }; 50})