2023-05-24 13:37:59 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, oniguruma
|
|
|
|
, stdenv
|
|
|
|
, darwin
|
2023-08-22 20:05:09 +00:00
|
|
|
, tailwindcss
|
2023-05-24 13:37:59 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "oranda";
|
2023-08-22 20:05:09 +00:00
|
|
|
version = "0.3.1";
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "axodotdev";
|
|
|
|
repo = "oranda";
|
|
|
|
rev = "v${version}";
|
2023-08-22 20:05:09 +00:00
|
|
|
hash = "sha256-v/4FPDww142V5mx+pHhaHkDiIUN70dwei8mTeZELztc=";
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
cargoHash = "sha256-Q5EY9PB50DxFXFTPiv3RktI37b2TCDqLVNISxixnspY=";
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
# oranda-generate-css which is used in the build script tries to download
|
|
|
|
# tailwindcss from the internet, so we have to patch it to use the
|
|
|
|
# tailwindcss from nixpkgs
|
|
|
|
./tailwind.patch
|
|
|
|
];
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
oniguruma
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
2023-07-15 17:15:38 +00:00
|
|
|
darwin.apple_sdk.frameworks.CoreServices
|
2023-05-24 13:37:59 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# requires internet access
|
|
|
|
checkFlags = [
|
|
|
|
"--skip=build"
|
2023-08-22 20:05:09 +00:00
|
|
|
"--skip=integration"
|
2023-05-24 13:37:59 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
env = {
|
|
|
|
RUSTONIG_SYSTEM_LIBONIG = true;
|
2023-08-22 20:05:09 +00:00
|
|
|
TAILWINDCSS = lib.getExe tailwindcss;
|
|
|
|
} // lib.optionalAttrs stdenv.isDarwin {
|
|
|
|
# without this, tailwindcss fails with OpenSSL configuration error
|
|
|
|
OPENSSL_CONF = "";
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Generate beautiful landing pages for your developer tools";
|
|
|
|
homepage = "https://github.com/axodotdev/oranda";
|
|
|
|
changelog = "https://github.com/axodotdev/oranda/blob/${src.rev}/CHANGELOG.md";
|
|
|
|
license = with licenses; [ asl20 mit ];
|
|
|
|
maintainers = with maintainers; [ figsoda ];
|
|
|
|
};
|
|
|
|
}
|