kiro-cli: de-dupe mainProgram with kiro package
Co-authored-by: Pol Dellaiera <pol.dellaiera@protonmail.com>
This commit is contained in:
co-authored by
Pol Dellaiera
parent
2859feb957
commit
0905f4e547
@@ -3,7 +3,6 @@
|
||||
stdenv,
|
||||
fetchurl,
|
||||
autoPatchelfHook,
|
||||
makeBinaryWrapper,
|
||||
undmg,
|
||||
versionCheckHook,
|
||||
xz,
|
||||
@@ -42,15 +41,13 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
makeBinaryWrapper
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||
autoPatchelfHook
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
undmg
|
||||
];
|
||||
nativeBuildInputs =
|
||||
lib.optionals stdenv.hostPlatform.isLinux [
|
||||
autoPatchelfHook
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
undmg
|
||||
];
|
||||
|
||||
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
|
||||
stdenv.cc.cc.lib
|
||||
@@ -68,16 +65,14 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
runHook preInstall
|
||||
''
|
||||
+ lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||
install -Dm755 bin/kiro-cli $out/bin/.kiro-wrapped
|
||||
install -Dm755 bin/kiro-cli -t $out/bin
|
||||
install -Dm755 bin/kiro-cli-chat $out/bin/kiro-cli-chat
|
||||
install -Dm755 bin/kiro-cli-term $out/bin/kiro-cli-term
|
||||
makeBinaryWrapper $out/bin/.kiro-wrapped $out/bin/kiro \
|
||||
--prefix PATH : $out/bin
|
||||
''
|
||||
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
mkdir -p $out/bin $out/Applications
|
||||
cp -r "../Kiro CLI.app" "$out/Applications/"
|
||||
ln -s "$out/Applications/Kiro CLI.app/Contents/MacOS/kiro-cli" $out/bin/kiro
|
||||
ln -s "$out/Applications/Kiro CLI.app/Contents/MacOS/kiro-cli" $out/bin/kiro-cli
|
||||
for bin in kiro-cli-chat kiro-cli-term; do
|
||||
if [[ -e "$out/Applications/Kiro CLI.app/Contents/MacOS/$bin" ]]; then
|
||||
ln -s "$out/Applications/Kiro CLI.app/Contents/MacOS/$bin" "$out/bin/$bin"
|
||||
@@ -96,7 +91,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
license = lib.licenses.unfree;
|
||||
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
|
||||
maintainers = [ lib.maintainers.jamesward ];
|
||||
mainProgram = "kiro";
|
||||
mainProgram = "kiro-cli";
|
||||
platforms = [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
|
||||
Reference in New Issue
Block a user