nixpkgs/pkgs/tools/text/paperoni/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

52 lines
983 B
Nix
Raw Normal View History

2022-05-13 04:20:00 +00:00
{ lib
, rustPlatform
, fetchFromGitHub
, curl
, stdenv
2022-05-13 04:20:00 +00:00
, pkg-config
, 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=";
};
cargoLock = {
lockFile = ./Cargo.lock;
};
nativeBuildInputs = [
curl
] ++ lib.optionals stdenv.isLinux [
pkg-config
];
2022-05-13 04:20:00 +00:00
buildInputs = [
curl
zlib
] ++ lib.optionals stdenv.isLinux [
openssl
];
2022-05-13 04:20:00 +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";
changelog = "https://github.com/hipstermojo/paperoni/releases/tag/${src.rev}";
2022-05-13 04:20:00 +00:00
license = licenses.mit;
maintainers = with maintainers; [ marsam ];
2022-05-13 04:20:00 +00:00
};
}