about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/gi/gifgen/package.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/by-name/gi/gifgen/package.nix')
-rw-r--r--nixpkgs/pkgs/by-name/gi/gifgen/package.nix39
1 files changed, 39 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/by-name/gi/gifgen/package.nix b/nixpkgs/pkgs/by-name/gi/gifgen/package.nix
new file mode 100644
index 000000000000..49c87eda795d
--- /dev/null
+++ b/nixpkgs/pkgs/by-name/gi/gifgen/package.nix
@@ -0,0 +1,39 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, ffmpeg
+, makeWrapper
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gifgen";
+  version = "1.2.0";
+
+  src = fetchFromGitHub {
+    owner = "lukechilds";
+    repo = "gifgen";
+    rev = version;
+    hash = "sha256-ni9RL4LyMejmu8vm5HC8WSTqAPQMBQNRDOZ4ZfvrkSU=";
+  };
+
+  nativeBuildInputs = [
+    makeWrapper
+  ];
+
+  installPhase = ''
+    runHook preInstall
+    install -Dm755 gifgen $out/bin/gifgen
+    wrapProgram $out/bin/gifgen \
+      --prefix PATH : ${lib.makeBinPath [ ffmpeg ]}
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Simple high quality GIF encoding";
+    homepage = "https://github.com/lukechilds/gifgen";
+    license = licenses.mit;
+    maintainers = with maintainers; [ snowflake ];
+    mainProgram = "gifgen";
+    platforms = platforms.all;
+  };
+}