Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
system:
let
pkgs = nixpkgs.legacyPackages.${system};
vicinaePkg = pkgs.callPackage ./vicinae.nix { };
vicinaePkg = pkgs.callPackage ./package.nix { };
nix-update-script = pkgs.writeShellScriptBin "nix-update-script" ''
OLD_API_DEPS_HASH=$(${pkgs.lib.getExe pkgs.nix} eval --raw .#packages.x86_64-linux.default.passthru.apiDeps.hash)
OLD_EXT_MAN_DEPS_HASH=$(${pkgs.lib.getExe pkgs.nix} eval --raw .#packages.x86_64-linux.default.passthru.extensionManagerDeps.hash)
Expand Down
114 changes: 42 additions & 72 deletions vicinae.nix → package.nix
Original file line number Diff line number Diff line change
@@ -1,28 +1,25 @@
{
stdenv,
fetchFromGitHub,
lib,
cmake,
pkg-config,
ninja,
fetchNpmDeps,
npmHooks,
autoPatchelfHook,

qt6,
kdePackages,

wayland,
minizip,
rapidfuzz-cpp,
protobuf,
grpc-tools,
nodejs,
minizip-ng,
cmark-gfm,
libqalculate,
ninja,
lib,
fetchNpmDeps,
protoc-gen-js,
rsync,
which,
autoPatchelfHook,
writeShellScriptBin,
minizip,
qt6,
typescript,
wayland,

}:
let
src = ./.;
Expand All @@ -47,20 +44,22 @@ let
src = src + /api;
hash = "sha256-7rsaGjs1wMe0zx+/BD1Mx7DQj3IAEZQvdS768jVLl3E=";
};
ts-protoc-gen-wrapper = writeShellScriptBin "protoc-gen-ts_proto" ''
exec node /build/source/vicinae-upstream/api/node_modules/.bin/protoc-gen-ts_proto
'';

# Prepare node_modules for extension-manager folder
extensionManagerDeps = fetchNpmDeps {
src = src + /extension-manager;
hash = "sha256-zoTe/n7PmC7h3bEYFX8OtLKr6T8WA7ijNhAekIhsgLc=";
};

in
stdenv.mkDerivation rec {
name = "vicinae";
stdenv.mkDerivation (finalAttrs: {
pname = "vicinae";
version = manifest.tag;

inherit src;
passthru = {
inherit apiDeps extensionManagerDeps;
};

cmakeFlags = [
"-DVICINAE_GIT_TAG=${manifest.tag}"
Expand All @@ -72,92 +71,63 @@ stdenv.mkDerivation rec {
];

nativeBuildInputs = [
ts-protoc-gen-wrapper
extensionManagerDeps
autoPatchelfHook
cmake
ninja
nodejs
pkg-config
qt6.wrapQtAppsHook
rapidfuzz-cpp
protoc-gen-js
protobuf
grpc-tools
which
rsync
typescript
autoPatchelfHook
];

buildInputs = [
qt6.qtbase
qt6.qtsvg
qt6.qttools
qt6.qtwayland
qt6.qtdeclarative
qt6.qt5compat

protobuf
rapidfuzz-cpp
wayland
kdePackages.qtkeychain
kdePackages.layer-shell-qt
minizip
grpc-tools
protobuf
nodejs
minizip-ng
minizip
cmark-gfm
libqalculate
];

configurePhase = ''
cmake -G Ninja -B build $cmakeFlags
postPatch = ''
local postPatchHooks=()
source ${npmHooks.npmConfigHook}/nix-support/setup-hook
npmRoot=api npmDeps=${apiDeps} npmConfigHook
npmRoot=extension-manager npmDeps=${extensionManagerDeps} npmConfigHook
'';

buildPhase = ''
buildDir=$PWD
echo $buildDir
export npm_config_cache=${apiDeps}
cd $buildDir/api
npm i --ignore-scripts
patchShebangs $buildDir/api
npm rebuild --foreground-scripts
export npm_config_cache=${extensionManagerDeps}
cd $buildDir/extension-manager
npm i --ignore-scripts
patchShebangs $buildDir/extension-manager
npm rebuild --foreground-scripts
cd $buildDir
substituteInPlace cmake/ExtensionApi.cmake cmake/ExtensionManager.cmake --replace "COMMAND npm install" ""
cmake --build build
cd $buildDir
'';

dontWrapQtApps = true;
preFixup = ''
wrapQtApp "$out/bin/vicinae" --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath buildInputs}
'';
postFixup = ''
wrapProgram $out/bin/vicinae \
--prefix PATH : ${
lib.makeBinPath [
nodejs
qt6.qtwayland
wayland
(placeholder "out")
]
}
'';

installPhase = ''
cmake --install build
'';
meta = {
description = "A raycast-like, high-performance, native launcher for your desktop";
longDescription = ''
Vicinae (pronounced "vih-SIN-ay") is a high-performance, native launcher for your desktop — built with C++ and Qt.

meta = with lib; {
description = "A focused launcher for your desktop — native, fast, extensible";
homepage = "https://github.com/vicinaehq/vicinae";
license = licenses.gpl3Plus;
It includes a set of built-in modules, and extensions can be developed quickly using fully server-side React/TypeScript — with no browser or Electron involved.

Inspired by the popular Raycast launcher, Vicinae provides a mostly compatible extension API, allowing reuse of many existing Raycast extensions with minimal modification.

Vicinae is designed for developers and power users who want fast, keyboard-first access to common system actions — without unnecessary overhead.
'';
license = lib.licenses.gpl3;
mainProgram = "vicinae";
homepage = "https://github.com/vicinaehq/vicinae";
# maintainers = with lib.maintainers [];
};
passthru = {
inherit apiDeps extensionManagerDeps;
};
}
})
Loading