summary refs log tree commit diff
path: root/pkgs/servers/web-apps
diff options
context:
space:
mode:
authorhappysalada <raphael@megzari.com>2021-09-29 11:43:07 +0900
committerRaphael Megzari <raphael@megzari.com>2021-09-29 16:49:56 +0900
commit84587ecefab25048229e41ba709f98643765482c (patch)
tree62af2c5f6709023c330eeb58af324c1c93f1f80f /pkgs/servers/web-apps
parent9ed8b85e79d6eac73f97d97ac226e02c5c7d128b (diff)
downloadnixpkgs-84587ecefab25048229e41ba709f98643765482c.tar
nixpkgs-84587ecefab25048229e41ba709f98643765482c.tar.gz
nixpkgs-84587ecefab25048229e41ba709f98643765482c.tar.bz2
nixpkgs-84587ecefab25048229e41ba709f98643765482c.tar.lz
nixpkgs-84587ecefab25048229e41ba709f98643765482c.tar.xz
nixpkgs-84587ecefab25048229e41ba709f98643765482c.tar.zst
nixpkgs-84587ecefab25048229e41ba709f98643765482c.zip
pict-rs: init at 0.3.0-alpha.37
Diffstat (limited to 'pkgs/servers/web-apps')
-rw-r--r--pkgs/servers/web-apps/pict-rs/default.nix44
1 files changed, 44 insertions, 0 deletions
diff --git a/pkgs/servers/web-apps/pict-rs/default.nix b/pkgs/servers/web-apps/pict-rs/default.nix
new file mode 100644
index 00000000000..96c8a83175b
--- /dev/null
+++ b/pkgs/servers/web-apps/pict-rs/default.nix
@@ -0,0 +1,44 @@
+{ stdenv
+, lib
+, fetchFromGitea
+, rustPlatform
+, makeWrapper
+, protobuf
+, Security
+, imagemagick
+, ffmpeg
+, exiftool
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "pict-rs";
+  version = "0.3.0-alpha.37";
+
+  src = fetchFromGitea {
+    domain = "git.asonix.dog";
+    owner = "asonix";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-21yfsCicn2bjSNEMMWDG8wvnw10uT3M1L3cXCUhc24c=";
+  };
+
+  cargoSha256 = "sha256-F/mqdIjF5QOq5Plnq0DyeFP1+b7dCBcoU9iFxzcaZws=";
+
+  # needed for internal protobuf c wrapper library
+  PROTOC = "${protobuf}/bin/protoc";
+  PROTOC_INCLUDE = "${protobuf}/include";
+
+  buildInputs = [ makeWrapper ] ++ lib.optionals stdenv.isDarwin [ Security ];
+
+  postInstall = ''
+    wrapProgram "$out/bin/pict-rs" \
+        --prefix PATH : "${lib.makeBinPath [ imagemagick ffmpeg exiftool ]}"
+  '';
+
+  meta = with lib; {
+    description = "a simple image hosting service";
+    homepage = "https://git.asonix.dog/asonix/pict-rs";
+    license = with licenses; [ agpl3Plus ];
+    maintainers = with maintainers; [ happysalada ];
+  };
+}