Unverified Commit 269cb2b7 authored by Yt's avatar Yt Committed by GitHub
Browse files

gleam: move to by-name, cleanup (#399635)

parents 4b662d6d e5be0e55
Loading
Loading
Loading
Loading
+17 −24
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  rustPlatform,
  fetchFromGitHub,
  git,
  pkg-config,
  openssl,
  erlang,
  erlang_27,
  nodejs,
  bun,
  deno,
  Security,
  versionCheckHook,
  nix-update-script,
  SystemConfiguration,
}:

rustPlatform.buildRustPackage rec {
rustPlatform.buildRustPackage (finalAttrs: {
  pname = "gleam";
  version = "1.10.0";

  src = fetchFromGitHub {
    owner = "gleam-lang";
    repo = pname;
    tag = "v${version}";
    repo = "gleam";
    tag = "v${finalAttrs.version}";
    hash = "sha256-0qK9dWkKnoXbIIBMN3p5noPEke/bgC8Bjtmf6lwtyr4=";
  };

  cargoHash = "sha256-EoRu8p6cUe1li54nVUkf+3qywIsDXh4ptIVLluJ3eFs=";

  nativeBuildInputs = [
    git
    pkg-config
    erlang
    erlang_27
    nodejs
    bun
    deno
  ];

  buildInputs =
    [
      openssl
    ]
    ++ lib.optionals stdenv.hostPlatform.isDarwin [
      Security
      SystemConfiguration
    ];

  useFetchCargoVendor = true;
  cargoHash = "sha256-EoRu8p6cUe1li54nVUkf+3qywIsDXh4ptIVLluJ3eFs=";
  buildInputs = [ openssl ];

  checkFlags = [
    # Makes a network request
    "--skip=tests::echo::echo_dict"
  ];

  doInstallCheck = true;
  nativeInstallCheckInputs = [ versionCheckHook ];

  passthru.updateScript = nix-update-script { };

  meta = with lib; {
  meta = {
    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 ];
    changelog = "https://github.com/gleam-lang/gleam/blob/v${finalAttrs.version}/CHANGELOG.md";
    license = lib.licenses.asl20;
    maintainers = lib.teams.beam.members ++ [ lib.maintainers.philtaken ];
  };
}
})
+0 −5
Original line number Diff line number Diff line
@@ -6370,11 +6370,6 @@ with pkgs;
    }
  );
  gleam = callPackage ../development/compilers/gleam {
    inherit (darwin.apple_sdk.frameworks) Security SystemConfiguration;
    erlang = erlang_27;
  };
  # Haskell and GHC
  haskell = callPackage ./haskell-packages.nix { };