Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, rustPlatform 3, fetchFromGitHub 4, curl 5, stdenv 6, pkg-config 7, zlib 8, openssl 9}: 10 11rustPlatform.buildRustPackage rec { 12 pname = "paperoni"; 13 version = "0.6.1-alpha1"; 14 15 src = fetchFromGitHub { 16 owner = "hipstermojo"; 17 repo = pname; 18 rev = "v${version}"; 19 sha256 = "sha256-vTylnDtoPpiRtk/vew1hLq3g8pepWRVqBEBnvSif4Zw="; 20 }; 21 22 cargoLock = { 23 lockFile = ./Cargo.lock; 24 }; 25 26 nativeBuildInputs = [ 27 curl 28 ] ++ lib.optionals stdenv.isLinux [ 29 pkg-config 30 ]; 31 32 buildInputs = [ 33 curl 34 zlib 35 ] ++ lib.optionals stdenv.isLinux [ 36 openssl 37 ]; 38 39 # update Cargo.lock to work with openssl 3 40 postPatch = '' 41 ln -sf ${./Cargo.lock} Cargo.lock 42 ''; 43 44 meta = with lib; { 45 description = "An article extractor in Rust"; 46 homepage = "https://github.com/hipstermojo/paperoni"; 47 changelog = "https://github.com/hipstermojo/paperoni/releases/tag/${src.rev}"; 48 license = licenses.mit; 49 maintainers = with maintainers; [ marsam ]; 50 }; 51}