nixpkgs/pkgs/servers/microbin/default.nix

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

48 lines
1.0 KiB
Nix
Raw Normal View History

2022-09-30 16:00:07 +00:00
{ lib
, rustPlatform
, fetchFromGitHub
, pkg-config
, oniguruma
, openssl
, stdenv
, darwin
2022-09-30 16:00:07 +00:00
}:
rustPlatform.buildRustPackage rec {
pname = "microbin";
version = "2.0.4";
2022-09-30 16:00:07 +00:00
src = fetchFromGitHub {
owner = "szabodanika";
repo = "microbin";
rev = "v${version}";
hash = "sha256-fsRpqSYDsuV0M6Xar2GVoyTgCPT39dcKJ6eW4YXCkQ0=";
2022-09-30 16:00:07 +00:00
};
cargoHash = "sha256-7GSgyh2aJ2f8pozoh/0Yxzbk8Wg3JYuqSy/34ywAc2s=";
nativeBuildInputs = [
pkg-config
];
buildInputs = [
oniguruma
openssl
] ++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Security
];
env = {
OPENSSL_NO_VENDOR = true;
RUSTONIG_SYSTEM_LIBONIG = true;
};
2022-09-30 16:00:07 +00:00
meta = with lib; {
description = "A tiny, self-contained, configurable paste bin and URL shortener written in Rust";
homepage = "https://github.com/szabodanika/microbin";
changelog = "https://github.com/szabodanika/microbin/releases/tag/v${version}";
2022-09-30 16:00:07 +00:00
license = licenses.bsd3;
maintainers = with maintainers; [ dit7ya figsoda ];
2022-09-30 16:00:07 +00:00
};
}