2023-04-14 17:36:19 +02:00
|
|
|
{ lib, stdenv, fetchurl, unzip }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
|
|
pname = "xcodes";
|
2023-06-28 19:18:42 +02:00
|
|
|
version = "1.4.1";
|
2023-04-14 17:36:19 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/XcodesOrg/xcodes/releases/download/${finalAttrs.version}/xcodes.zip";
|
2023-06-28 19:18:42 +02:00
|
|
|
hash = "sha256-PtXF2eqNfEX29EtXlcjdxrUs7BPn/YurUuFFeLpXwrk=";
|
2023-04-14 17:36:19 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ unzip ];
|
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
runHook preUnpack
|
|
|
|
unzip -q $src
|
|
|
|
runHook postUnpack
|
|
|
|
'';
|
|
|
|
|
|
|
|
dontPatch = true;
|
|
|
|
dontConfigure = true;
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/bin
|
|
|
|
install -m755 xcodes $out/bin/xcodes
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
dontFixup = true;
|
|
|
|
|
|
|
|
meta = with lib; {
|
2023-06-28 19:18:42 +02:00
|
|
|
changelog = "https://github.com/XcodesOrg/xcodes/releases/tag/${finalAttrs.version}";
|
2023-04-14 17:36:19 +02:00
|
|
|
description = "Command-line tool to install and switch between multiple versions of Xcode";
|
|
|
|
homepage = "https://github.com/XcodesOrg/xcodes";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ _0x120581f ];
|
|
|
|
platforms = platforms.darwin;
|
|
|
|
};
|
|
|
|
})
|