2022-05-13 04:20:00 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
2023-05-13 02:45:20 +00:00
|
|
|
, curl
|
|
|
|
, stdenv
|
2022-05-13 04:20:00 +00:00
|
|
|
, pkg-config
|
2023-05-13 02:45:20 +00:00
|
|
|
, zlib
|
2022-05-13 04:20:00 +00:00
|
|
|
, openssl
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "paperoni";
|
|
|
|
version = "0.6.1-alpha1";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hipstermojo";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-vTylnDtoPpiRtk/vew1hLq3g8pepWRVqBEBnvSif4Zw=";
|
|
|
|
};
|
|
|
|
|
2023-05-13 02:45:20 +00:00
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
curl
|
|
|
|
] ++ lib.optionals stdenv.isLinux [
|
|
|
|
pkg-config
|
|
|
|
];
|
2022-05-13 04:20:00 +00:00
|
|
|
|
2023-05-13 02:45:20 +00:00
|
|
|
buildInputs = [
|
|
|
|
curl
|
|
|
|
zlib
|
|
|
|
] ++ lib.optionals stdenv.isLinux [
|
|
|
|
openssl
|
|
|
|
];
|
2022-05-13 04:20:00 +00:00
|
|
|
|
2023-05-13 02:45:20 +00:00
|
|
|
# update Cargo.lock to work with openssl 3
|
|
|
|
postPatch = ''
|
|
|
|
ln -sf ${./Cargo.lock} Cargo.lock
|
|
|
|
'';
|
2022-05-13 04:20:00 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "An article extractor in Rust";
|
|
|
|
homepage = "https://github.com/hipstermojo/paperoni";
|
2023-05-13 02:45:20 +00:00
|
|
|
changelog = "https://github.com/hipstermojo/paperoni/releases/tag/${src.rev}";
|
2022-05-13 04:20:00 +00:00
|
|
|
license = licenses.mit;
|
2023-05-13 02:45:20 +00:00
|
|
|
maintainers = with maintainers; [ marsam ];
|
2022-05-13 04:20:00 +00:00
|
|
|
};
|
|
|
|
}
|