nixpkgs-immich/pkgs/development/compilers/gleam/default.nix
2024-09-17 10:23:40 -06:00

42 lines
994 B
Nix

{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, git
, pkg-config
, openssl
, Security
, nix-update-script
, SystemConfiguration
}:
rustPlatform.buildRustPackage rec {
pname = "gleam";
version = "1.4.1";
src = fetchFromGitHub {
owner = "gleam-lang";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-z9xDMQXzVUeHne7KG4QsutQAiU01mgnV7ccdkjl+EkU=";
};
nativeBuildInputs = [ git pkg-config ];
buildInputs = [ openssl ] ++
lib.optionals stdenv.isDarwin [ Security SystemConfiguration ];
cargoHash = "sha256-XKHcA4DSVsWZfUHT6BkRjK0Mzz90E+ohYrtwZKPMtTY=";
passthru.updateScript = nix-update-script { };
meta = with lib; {
description = "Statically typed language for the Erlang VM";
mainProgram = "gleam";
homepage = "https://gleam.run/";
changelog = "https://github.com/gleam-lang/gleam/blob/v${version}/CHANGELOG.md";
license = licenses.asl20;
maintainers = teams.beam.members ++ [ lib.maintainers.philtaken ];
};
}