depot/third_party/nixpkgs/pkgs/development/tools/build-managers/alire/default.nix
Default email ae2dc6aea6 Project import generated by Copybara.
GitOrigin-RevId: 4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0
2024-10-11 07:15:48 +02:00

54 lines
1.1 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, gprbuild
, gnat
}:
stdenv.mkDerivation (finalAttrs: {
pname = "alire";
version = "2.0.2";
src = fetchFromGitHub {
owner = "alire-project";
repo = "alire";
rev = "v${finalAttrs.version}";
hash = "sha256-m4EPiqh7KCeNgq4G727jrW5ABb+uecvvpmZyskqtml4=";
fetchSubmodules = true;
};
nativeBuildInputs = [ gprbuild gnat ];
postPatch = ''
patchShebangs ./dev/build.sh ./scripts/version-patcher.sh
'';
buildPhase = ''
runHook preBuild
export ALIRE_BUILD_JOBS="$NIX_BUILD_CORES"
./dev/build.sh
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out
cp -r ./bin $out
runHook postInstall
'';
meta = {
description = "Source-based package manager for the Ada and SPARK programming languages";
homepage = "https://alire.ada.dev";
changelog = "https://github.com/alire-project/alire/releases/tag/v${finalAttrs.version}";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ atalii ];
platforms = lib.platforms.unix;
mainProgram = "alr";
};
})