2023-02-02 18:25:31 +00:00
|
|
|
{ lib, stdenv, callPackage, makeWrapper, jq, nix-prefetch-git }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "swiftpm2nix";
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
dontUnpack = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -vD ${./swiftpm2nix.sh} $out/bin/swiftpm2nix
|
|
|
|
wrapProgram $out/bin/$name \
|
|
|
|
--prefix PATH : ${lib.makeBinPath [ jq nix-prefetch-git ]} \
|
|
|
|
'';
|
|
|
|
|
|
|
|
preferLocalBuild = true;
|
|
|
|
|
|
|
|
passthru = callPackage ./support.nix { };
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Generate a Nix expression to fetch swiftpm dependencies";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "swiftpm2nix";
|
2024-07-27 06:49:29 +00:00
|
|
|
maintainers = lib.teams.swift.members;
|
2023-02-02 18:25:31 +00:00
|
|
|
platforms = lib.platforms.all;
|
|
|
|
};
|
|
|
|
}
|