fix: clean up flake.nix, move package.nix to flake.nix (#30)

Cleans up the flake.nix and moves the pakckage.nix into flake.nix due to
it being so small
This commit is contained in:
Charlie Root 2024-10-27 09:31:41 +01:00 committed by GitHub
commit 962224a669
Failed to generate hash of commit
2 changed files with 31 additions and 37 deletions

View file

@ -12,14 +12,37 @@
...
} @ inputs: let
systems = ["x86_64-linux"];
forAllSystems = nixpkgs.lib.genAttrs systems;
packagesForEach = nixpkgs.legacyPackages;
eachSystem = nixpkgs.lib.genAttrs systems;
pkgsFor = nixpkgs.legacyPackages;
in {
packages = forAllSystems (system: rec {
default = hypr-dynamic-cursors;
hypr-dynamic-cursors = packagesForEach.${system}.callPackage ./nix/package.nix {
inherit inputs;
pkgs = packagesForEach.${system};
packages = eachSystem (system: {
default = self.packages.${system}.hypr-dynamic-cursors;
hypr-dynamic-cursors = let
inherit (inputs.hyprland.packages.${system}) hyprland;
inherit (pkgsFor.${system}) stdenvNoCC gcc13;
name = "hypr-dynamic-cursors";
in
stdenvNoCC.mkDerivation {
inherit name;
src = ./.;
inherit (hyprland) buildInputs;
nativeBuildInputs = hyprland.nativeBuildInputs ++ [hyprland gcc13];
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
'';
};
});
};

View file

@ -1,29 +0,0 @@
{
inputs,
pkgs,
}: let
inherit (inputs.hyprland.packages.${pkgs.system}) hyprland;
inherit (hyprland) buildInputs nativeBuildInputs;
inherit (pkgs) stdenvNoCC gcc13;
name = "hypr-dynamic-cursors";
in
stdenvNoCC.mkDerivation {
inherit name buildInputs;
src = ./..;
nativeBuildInputs = nativeBuildInputs ++ [hyprland gcc13];
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
'';
}