nixpkgs/pkgs/by-name/xc/xcodes/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

54 lines
1.2 KiB
Nix
Raw Normal View History

2024-11-10 06:41:17 +00:00
{
lib,
fetchFromGitHub,
swiftPackages,
swift,
swiftpm,
swiftpm2nix,
makeWrapper,
aria2,
2023-07-24 16:47:12 +00:00
}:
let
generated = swiftpm2nix.helpers ./generated;
2024-11-10 06:41:17 +00:00
stdenv = swiftPackages.stdenv;
2023-07-24 16:47:12 +00:00
in
2023-04-14 15:36:19 +00:00
stdenv.mkDerivation (finalAttrs: {
pname = "xcodes";
2024-11-10 06:41:17 +00:00
version = "1.6.0";
2023-04-14 15:36:19 +00:00
2023-07-24 16:47:12 +00:00
src = fetchFromGitHub {
owner = "XcodesOrg";
repo = "xcodes";
2023-07-24 16:47:12 +00:00
rev = finalAttrs.version;
2024-11-10 06:41:17 +00:00
hash = "sha256-TwPfASRU98rifyA/mINFfoY0MbbwmAh8JneVpJa38CA=";
2023-04-14 15:36:19 +00:00
};
2023-07-24 16:47:12 +00:00
nativeBuildInputs = [ swift swiftpm makeWrapper ];
2023-04-14 15:36:19 +00:00
2023-07-24 16:47:12 +00:00
configurePhase = generated.configure;
2023-04-14 15:36:19 +00:00
installPhase = ''
runHook preInstall
2023-07-24 16:47:12 +00:00
binPath="$(swiftpmBinPath)"
install -D $binPath/xcodes $out/bin/xcodes
wrapProgram $out/bin/xcodes \
--prefix PATH : ${lib.makeBinPath [ aria2 ]}
2023-04-14 15:36:19 +00:00
runHook postInstall
'';
2024-11-10 06:42:15 +00:00
meta = {
changelog = "https://github.com/XcodesOrg/xcodes/releases/tag/${finalAttrs.version}";
2023-04-14 15:36:19 +00:00
description = "Command-line tool to install and switch between multiple versions of Xcode";
homepage = "https://github.com/XcodesOrg/xcodes";
2024-11-10 06:42:15 +00:00
license = with lib.licenses; [
2023-07-24 16:47:12 +00:00
mit
# unxip
lgpl3Only
];
2024-11-10 06:42:15 +00:00
maintainers = with lib.maintainers; [ _0x120581f emilytrau ];
platforms = lib.platforms.darwin;
2023-04-14 15:36:19 +00:00
};
})