nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 49 lines 975 B view raw
1{ 2 stdenv, 3 lib, 4 fetchFromGitHub, 5 swift, 6 swiftpm, 7 swiftpm2nix, 8 sqlite, 9}: 10let 11 generated = swiftpm2nix.helpers ./nix; 12in 13stdenv.mkDerivation rec { 14 pname = "needle"; 15 version = "0.24.0"; 16 17 src = fetchFromGitHub { 18 owner = "uber"; 19 repo = "needle"; 20 rev = "v${version}"; 21 hash = "sha256-vQlUcfIj+LHZ3R+XwSr9bBIjcZUWkW2k/wI6HF+sDPo="; 22 }; 23 24 sourceRoot = "${src.name}/Generator"; 25 26 nativeBuildInputs = [ 27 swift 28 swiftpm 29 ]; 30 31 propagatedBuildInputs = [ sqlite ]; 32 33 configurePhase = generated.configure; 34 35 installPhase = '' 36 runHook preInstall 37 install -Dm755 "$(swiftpmBinPath)"/needle $out/bin/needle 38 runHook postInstall 39 ''; 40 41 meta = with lib; { 42 description = "Compile-time safe Swift dependency injection framework"; 43 homepage = "https://github.com/uber/needle"; 44 license = licenses.asl20; 45 mainProgram = "needle"; 46 maintainers = with maintainers; [ matteopacini ]; 47 platforms = platforms.darwin; 48 }; 49}