1{ lib
2, stdenv
3, rustPlatform
4, fetchFromGitHub
5, git
6, pkg-config
7, openssl
8, Security
9, nix-update-script
10, SystemConfiguration
11}:
12
13rustPlatform.buildRustPackage rec {
14 pname = "gleam";
15 version = "1.1.0";
16
17 src = fetchFromGitHub {
18 owner = "gleam-lang";
19 repo = pname;
20 rev = "refs/tags/v${version}";
21 hash = "sha256-3DlsqUBAKF3zgiS26YQY1MzymLg9GnVzH1HMpbYv5Dc=";
22 };
23
24 nativeBuildInputs = [ git pkg-config ];
25
26 buildInputs = [ openssl ] ++
27 lib.optionals stdenv.isDarwin [ Security SystemConfiguration ];
28
29 cargoHash = "sha256-KROGDBOsx1WTzv7IhJ3WWLJJ9zvrmZI5poJCr2tFcLY=";
30
31 passthru.updateScript = nix-update-script { };
32
33 meta = with lib; {
34 description = "A statically typed language for the Erlang VM";
35 mainProgram = "gleam";
36 homepage = "https://gleam.run/";
37 license = licenses.asl20;
38 maintainers = teams.beam.members;
39 };
40}