nixpkgs/pkgs/development/tools/mix2nix/default.nix
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00

27 lines
647 B
Nix

{ stdenv, lib, fetchFromGitHub, elixir, erlang }:
stdenv.mkDerivation rec {
pname = "mix2nix";
version = "0.1.9";
src = fetchFromGitHub {
owner = "ydlr";
repo = "mix2nix";
rev = version;
hash = "sha256-Wh3KFp1gNDOKOG/DZdftmgy/M+67ZGfdj6W3ETQpX/8=";
};
nativeBuildInputs = [ elixir ];
buildInputs = [ erlang ];
buildPhase = "mix escript.build";
installPhase = "install -Dt $out/bin mix2nix";
meta = with lib; {
description = "Generate nix expressions from mix.lock file.";
mainProgram = "mix2nix";
license = licenses.mit;
maintainers = with maintainers; [ ydlr ] ++ teams.beam.members;
};
}