feat: add nix flake (#2)

This commit is contained in:
Jappie3 2024-06-28 14:29:12 +02:00 committed by GitHub
commit 8950c117f7
Failed to generate hash of commit
5 changed files with 337 additions and 0 deletions

25
nix/package.nix Normal file
View file

@ -0,0 +1,25 @@
{
inputs,
pkgs,
}:
pkgs.stdenvNoCC.mkDerivation rec {
name = "hypr-dynamic-cursors";
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 out/* "$out/lib/lib${name}.so"
runHook postInstall
'';
}