Files
hyprEasymotion/flake.nix
2024-09-23 00:02:44 +00:00

46 lines
1.3 KiB
Nix

# Nix config informed by VirtCode's 'Dynamic Cursor'
# https://github.com/VirtCode/hypr-dynamic-cursors
{
description = "Easymotion, for hyprland";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
};
outputs = {
self,
nixpkgs,
...
} @ inputs: let
forAllSystems = function:
nixpkgs.lib.genAttrs [
"x86_64-linux"
] (system: function nixpkgs.legacyPackages.${system});
in {
packages = forAllSystems (pkgs: {
default = self.packages.${pkgs.system}.hyprland-easymotion;
hyprland-easymotion = pkgs.stdenvNoCC.mkDerivation rec {
name = "hyprland-easymotion";
pname = name;
src = ./.;
nativeBuildInputs = inputs.hyprland.packages.${pkgs.system}.hyprland.nativeBuildInputs ++ [inputs.hyprland.packages.${pkgs.system}.hyprland pkgs.gcc13];
buildInputs = inputs.hyprland.packages.${pkgs.system}.hyprland.buildInputs;
dontUseCmakeConfigure = true;
dontUseMesonConfigure = true;
dontUseNinjaBuild = true;
dontUseNinjaInstall = true;
installPhase = ''
runHook preInstall
mkdir -p "$out/lib"
cp -r ./hypreasymotion.so "$out/lib/libhyprland-easymotion.so"
runHook postInstall
'';
};
});
};
}