From 8f6ebec4dd22acbdce6e70a2d15b74bacc31ee56 Mon Sep 17 00:00:00 2001 From: haruki7049 Date: Sat, 16 Nov 2024 04:28:55 +0900 Subject: [PATCH] mitra: Init at 3.9.0 --- pkgs/by-name/mi/mitra/package.nix | 41 +++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 pkgs/by-name/mi/mitra/package.nix diff --git a/pkgs/by-name/mi/mitra/package.nix b/pkgs/by-name/mi/mitra/package.nix new file mode 100644 index 0000000000000..b27b13490a047 --- /dev/null +++ b/pkgs/by-name/mi/mitra/package.nix @@ -0,0 +1,41 @@ +{ + lib, + rustPlatform, + fetchFromGitea, +}: + +rustPlatform.buildRustPackage rec { + pname = "mitra"; + version = "3.9.0"; + + src = fetchFromGitea { + domain = "codeberg.org"; + owner = "silverpill"; + repo = "mitra"; + rev = "v${version}"; + hash = "sha256-reBG9h3jI4ONxYIwM2QdXlTC8ohmSrPm18sLOeI/2wY="; + }; + + useFetchCargoVendor = true; + cargoHash = "sha256-WoJzFhxBDHuUNGaNsqieev93hg0Eo604tAM0HZJv9tA="; + + # MEMO: mitra v3.9.0 tests failed with cargo option, "--offline" + doCheck = false; + + RUSTFLAGS = [ + # MEMO: mitra use ammonia crate with unstable rustc flag + "--cfg=ammonia_unstable" + ]; + + buildFeatures = [ + "production" + ]; + + meta = { + description = "Federated micro-blogging platform"; + homepage = "https://codeberg.org/silverpill/mitra"; + license = lib.licenses.agpl3Only; + maintainers = with lib.maintainers; [ haruki7049 ]; + mainProgram = "mitra"; + }; +}