mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-11 16:23:26 +00:00
ff1a94e523
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.
27 lines
680 B
Nix
27 lines
680 B
Nix
{ 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";
|
|
mainProgram = "swiftpm2nix";
|
|
maintainers = with lib.maintainers; [ dtzWill trepetti dduan trundle stephank ];
|
|
platforms = lib.platforms.all;
|
|
};
|
|
}
|