2021-07-14 22:03:04 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, openssl
|
|
|
|
, postgresql
|
|
|
|
, libiconv
|
|
|
|
, Security
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "lemmy-server";
|
2021-09-18 10:52:07 +00:00
|
|
|
version = "0.12.2";
|
2021-07-14 22:03:04 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "LemmyNet";
|
|
|
|
repo = "lemmy";
|
|
|
|
rev = version;
|
2021-09-18 10:52:07 +00:00
|
|
|
sha256 = "sha256-jhUpQ2f+b0BEXVfQOIujxam2PQA44wluUraJVJxL6LU=";
|
2021-07-14 22:03:04 +00:00
|
|
|
};
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
cargoSha256 = "sha256-2i8zCwd33LtUKxOChx/SLP9sWMRmxGkKK8xzaJImMHM=";
|
2021-07-14 22:03:04 +00:00
|
|
|
|
|
|
|
buildInputs = [ postgresql ]
|
|
|
|
++ lib.optionals stdenv.isDarwin [ libiconv Security ];
|
|
|
|
|
|
|
|
# Using OPENSSL_NO_VENDOR is not an option on darwin
|
|
|
|
# As of version 0.10.35 rust-openssl looks for openssl on darwin
|
|
|
|
# with a hardcoded path to /usr/lib/libssl.x.x.x.dylib
|
|
|
|
# https://github.com/sfackler/rust-openssl/blob/master/openssl-sys/build/find_normal.rs#L115
|
|
|
|
OPENSSL_LIB_DIR = "${openssl.out}/lib";
|
|
|
|
OPENSSL_INCLUDE_DIR = "${openssl.dev}/include";
|
|
|
|
|
|
|
|
meta = with lib; {
|
2021-09-18 10:52:07 +00:00
|
|
|
description = "🐀 Building a federated alternative to reddit in rust";
|
2021-07-14 22:03:04 +00:00
|
|
|
homepage = "https://join-lemmy.org/";
|
|
|
|
license = licenses.agpl3Only;
|
|
|
|
maintainers = with maintainers; [ happysalada ];
|
|
|
|
};
|
|
|
|
}
|