1
0
Fork 0

vfkit: add package; aerospace: remove
All checks were successful
Build / build-amd64-linux (push) Successful in 44s
Build / build-arm64-linux (push) Successful in 9m15s

This commit is contained in:
Daniel Kempkens 2024-06-09 19:36:09 +02:00
parent beb67698f0
commit 538627776c
Signed by: daniel
SSH key fingerprint: SHA256:Ks/MyhQYcPRQiwMKLAKquWCdCPe3JXlb1WttgnAoSeM
3 changed files with 33 additions and 44 deletions

View file

@ -26,10 +26,10 @@
darwinPackages = darwinPackages =
if lib.hasSuffix "darwin" system then { if lib.hasSuffix "darwin" system then {
aerospace = callPackage ./packages/aerospace.nix { };
cliclick = callPackage ./packages/cliclick.nix { }; cliclick = callPackage ./packages/cliclick.nix { };
phantomjs = callPackage ./packages/phantomjs.nix { }; phantomjs = callPackage ./packages/phantomjs.nix { };
tabnine = callPackage ./packages/tabnine { }; tabnine = callPackage ./packages/tabnine { };
vfkit = callPackage ./packages/vfkit.nix { };
} else { }; } else { };
in in
{ {

View file

@ -1,43 +0,0 @@
{ pkgs, lib }:
pkgs.stdenvNoCC.mkDerivation rec {
pname = "aerospace";
version = "0.11.1-Beta";
src = pkgs.fetchurl {
url = "https://github.com/nikitabobko/AeroSpace/releases/download/v${version}/AeroSpace-v${version}.zip";
hash = "sha256-HEAHvP3M4UR/pQX/q2nYJZgh3ob5TpIk/TGNQgjD4PY=";
};
nativeBuildInputs = with pkgs; [ installShellFiles unzip ];
unpackPhase = ''
unzip $src
'';
installPhase = ''
runHook preInstall
mkdir -p "$out/Applications"
OUT_APP="$out/Applications/AeroSpace.app"
cp -r AeroSpace-v${version}/AeroSpace.app "$OUT_APP"
install -D AeroSpace-v${version}/bin/aerospace $out/bin/aerospace
installManPage AeroSpace-v${version}/manpage/*
runHook postInstall
'';
doInstallCheck = true;
installCheckPhase = ''
$out/bin/aerospace --version
'';
meta = with lib; {
description = "AeroSpace is an i3-like tiling window manager for macOS";
homepage = "https://github.com/nikitabobko/AeroSpace";
license = licenses.mit;
platforms = [ "x86_64-darwin" "aarch64-darwin" ];
};
}

32
packages/vfkit.nix Normal file
View file

@ -0,0 +1,32 @@
{ pkgs, lib, ... }:
# Based on: https://github.com/NixOS/nixpkgs/issues/306179#issuecomment-2119521348
pkgs.stdenvNoCC.mkDerivation rec {
pname = "vfkit";
version = "0.5.1";
src = pkgs.fetchurl {
url = "https://github.com/crc-org/vfkit/releases/download/v${version}/vfkit";
hash = "sha256-at+KsvsKO359d4VUvcSuio2ej5hM6//U4Mj/jqXwhEc=";
};
dontUnpack = true;
installPhase = ''
runHook preInstall
install -Dm755 $src $out/bin/vfkit
runHook postInstall
'';
meta = {
description = "Simple command line tool to start VMs through virtualization framework";
homepage = "https://github.com/crc-org/vfkit";
license = lib.licenses.asl20;
platforms = lib.platforms.darwin;
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
mainProgram = "vfkit";
};
}