about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/misc/rust-motd
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/misc/rust-motd')
-rw-r--r--nixpkgs/pkgs/tools/misc/rust-motd/default.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/misc/rust-motd/default.nix b/nixpkgs/pkgs/tools/misc/rust-motd/default.nix
new file mode 100644
index 000000000000..26b582e5e944
--- /dev/null
+++ b/nixpkgs/pkgs/tools/misc/rust-motd/default.nix
@@ -0,0 +1,43 @@
+{ lib
+, rustPlatform
+, fetchFromGitHub
+, pkg-config
+, openssl
+, stdenv
+, Security
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "rust-motd";
+  version = "1.0.1";
+
+  src = fetchFromGitHub {
+    owner = "rust-motd";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-x3dx4PdYSYd7wA/GGj9QYC8rK33FWATs2SnaOagGE80=";
+  };
+
+  cargoHash = "sha256-7YvzVG3c10EJET+659F1fwgZ0SmBKMdAWD6LeWnGrNI=";
+
+  nativeBuildInputs = [
+    pkg-config
+  ];
+
+  buildInputs = [
+    openssl
+  ] ++ lib.optionals stdenv.isDarwin [
+    Security
+  ];
+
+  OPENSSL_NO_VENDOR = 1;
+
+  meta = with lib; {
+    description = "Beautiful, useful MOTD generation with zero runtime dependencies";
+    homepage = "https://github.com/rust-motd/rust-motd";
+    changelog = "https://github.com/rust-motd/rust-motd/releases/tag/v${version}";
+    license = licenses.mit;
+    maintainers = with maintainers; [ figsoda ];
+    mainProgram = "rust-motd";
+  };
+}