depot/third_party/nixpkgs/pkgs/by-name/ne/needle/package.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

49 lines
975 B
Nix

{
stdenv,
lib,
fetchFromGitHub,
swift,
swiftpm,
swiftpm2nix,
sqlite,
}:
let
generated = swiftpm2nix.helpers ./nix;
in
stdenv.mkDerivation rec {
pname = "needle";
version = "0.24.0";
src = fetchFromGitHub {
owner = "uber";
repo = "needle";
rev = "v${version}";
hash = "sha256-vQlUcfIj+LHZ3R+XwSr9bBIjcZUWkW2k/wI6HF+sDPo=";
};
sourceRoot = "${src.name}/Generator";
nativeBuildInputs = [
swift
swiftpm
];
propagatedBuildInputs = [ sqlite ];
configurePhase = generated.configure;
installPhase = ''
runHook preInstall
install -Dm755 "$(swiftpmBinPath)"/needle $out/bin/needle
runHook postInstall
'';
meta = with lib; {
description = "Compile-time safe Swift dependency injection framework";
homepage = "https://github.com/uber/needle";
license = licenses.asl20;
mainProgram = "needle";
maintainers = with maintainers; [ matteopacini ];
platforms = platforms.darwin;
};
}