about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2022-05-13 04:20:00 +0000
committerMario Rodas <marsam@users.noreply.github.com>2022-05-13 04:20:00 +0000
commite915a1c54d46f74778e36558ed04dab3b784537a (patch)
tree868b05164359d2e22c74238c571fc1311f9a8128
parentf7a22851667ac89ac1863ede0d8c386fc6eb12a0 (diff)
paperoni: init at 0.6.1-alpha1
-rw-r--r--pkgs/tools/text/paperoni/default.nix34
-rw-r--r--pkgs/top-level/all-packages.nix4
2 files changed, 38 insertions, 0 deletions
diff --git a/pkgs/tools/text/paperoni/default.nix b/pkgs/tools/text/paperoni/default.nix
new file mode 100644
index 0000000000000..8c9bbf9e6227f
--- /dev/null
+++ b/pkgs/tools/text/paperoni/default.nix
@@ -0,0 +1,34 @@
+{ lib
+, stdenv
+, rustPlatform
+, fetchFromGitHub
+, pkg-config
+, openssl
+, Security
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "paperoni";
+  version = "0.6.1-alpha1";
+
+  src = fetchFromGitHub {
+    owner = "hipstermojo";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-vTylnDtoPpiRtk/vew1hLq3g8pepWRVqBEBnvSif4Zw=";
+  };
+
+  cargoSha256 = "sha256-iLEIGuVB9ykNcwbXk/donDdBuMvitM54Ax6bszVGaO0=";
+
+  nativeBuildInputs = lib.optionals stdenv.isLinux [ pkg-config ];
+
+  buildInputs = lib.optionals stdenv.isLinux [ openssl ]
+    ++ lib.optionals stdenv.isDarwin [ Security ];
+
+  meta = with lib; {
+    description = "An article extractor in Rust";
+    homepage = "https://github.com/hipstermojo/paperoni";
+    license = licenses.mit;
+    maintainers = [ maintainers.marsam ];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 95e5bec551a20..35bfae03b7bcf 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -9173,6 +9173,10 @@ with pkgs;
 
   paperless-ngx = callPackage ../applications/office/paperless-ngx { };
 
+  paperoni = callPackage ../tools/text/paperoni {
+    inherit (darwin.apple_sdk.frameworks) Security;
+  };
+
   paperwork = callPackage ../applications/office/paperwork/paperwork-gtk.nix { };
 
   papertrail = callPackage ../tools/text/papertrail { };