Unverified Commit ca7894b0 authored by figsoda's avatar figsoda Committed by GitHub
Browse files

Merge pull request #227095 from figsoda/codemov

parents a4ee149b a8a97691
Loading
Loading
Loading
Loading
+1689 −0

File added.

Preview size limit exceeded, changes collapsed.

+54 −0
Original line number Diff line number Diff line
{ lib
, rustPlatform
, fetchFromGitHub
, makeBinaryWrapper
, pkg-config
, oniguruma
, ffmpeg
, git
}:

rustPlatform.buildRustPackage {
  pname = "codemov";
  version = "unstable-2022-10-24";

  src = fetchFromGitHub {
    owner = "sloganking";
    repo = "codemov";
    rev = "d51e83246eafef32c3a3f54407fe49eb9801f5ea";
    hash = "sha256-4Z3XASFlALCnX1guDqhBfvGNZ0V1XSruJvvSm0xr/t4=";
  };

  cargoLock = {
    lockFile = ./Cargo.lock;
  };

  postPatch = ''
    ln -s ${./Cargo.lock} Cargo.lock
  '';

  nativeBuildInputs = [
    makeBinaryWrapper
    pkg-config
  ];

  buildInputs = [
    oniguruma
  ];

  env = {
    RUSTONIG_SYSTEM_LIBONIG = true;
  };

  postInstall = ''
    wrapProgram $out/bin/codemov \
      --prefix PATH : ${lib.makeBinPath [ ffmpeg git ]}
  '';

  meta = with lib; {
    description = "Create a video of how a git repository's code changes over time";
    homepage = "https://github.com/sloganking/codemov";
    license = licenses.mit;
    maintainers = with maintainers; [ figsoda ];
  };
}
+2 −0
Original line number Diff line number Diff line
@@ -6460,6 +6460,8 @@ with pkgs;
  codebraid = callPackage ../tools/misc/codebraid { };
  codemov = callPackage ../tools/misc/codemov { };
  codevis = callPackage ../tools/misc/codevis { };
  compass = callPackage ../development/tools/compass { };