Skip to content

Commit

Permalink
Fix nix stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Libadoxon committed Jul 27, 2024
1 parent 8e2507d commit b97d06e
Show file tree
Hide file tree
Showing 5 changed files with 161 additions and 84 deletions.
134 changes: 134 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 20 additions & 18 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,35 @@

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
utils.url = "github:numtide/flake-utils";
systems.url = "github:nix-systems/default-linux";

hyprlang = {
url = "github:hyprwm/hyprlang";
hyprcursor = {
url = "github:hyprwm/hyprcursor";
inputs.nixpkgs.follows = "nixpkgs";
};
};

outputs =
{
self,
nixpkgs,
utils,
hyprlang,
}:
utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs { inherit system; };
in
hyprcursor,
systems,
...
}@inputs:
let
pkgs = nixpkgs;
eachSystem = pkgs.lib.genAttrs (import systems);
in
{
packages = eachSystem (system: {
default = self.packages.${system}.mcmojave-hyprcursor;

{
packages = {
mcmojave-hyprcursor-light = pkgs.callPackage ./nix/light.nix { inherit pkgs; };
mcmojave-hyprcursor-dark = pkgs.callPackage ./nix/dark.nix { inherit pkgs; };
mcmojave-hyprcursor = inputs.nixpkgs.legacyPackages.${system}.callPackage ./nix {
inherit hyprcursor;
};
});

formatter = nixpkgs.${system}.nixpkgs-fmt;
}
);
formatter = eachSystem (system: nixpkgs.${system}.nixpkgs-format);
};
}
28 changes: 0 additions & 28 deletions nix/dark.nix

This file was deleted.

17 changes: 7 additions & 10 deletions nix/default.nix
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
{
lib,
stdenv,
fetchFromGitHub,
hyprcursor,
}:
stdenv.mkDerivation (finalAttrs: {
stdenv.mkDerivation {
pname = "mcmojave-hyprcursor";
version = "0.1";
src = fetchFromGitHub {
owner = "libadoxon";
repo = "mcmojave-hyprcursor";
rev = "d2c0e6802f0ed1e7c638bb27b5aa8587b578d083";
sha256 = "sha256-ArUX5qlqAXUqcRqHz4QxXy3KgkfasTPA/Qwf6D2kV0U=";
};
src = ../.;

nativeBuildInputs = [ hyprcursor.packages.${stdenv.hostPlatform.system}.hyprcursor ];

installPhase = ''
runHook preInstall
mkdir -p $out/share/icons/mcmojave-hyprcursor
cp -R . $out/share/icons/mcmojave-hyprcursor/
hyprcursor-util --create $src -o $out/share/icons/mcmojave-hyprcursor/
runHook postInstall
'';
Expand All @@ -29,4 +26,4 @@ stdenv.mkDerivation (finalAttrs: {
license = licenses.gpl3;
maintainers = with maintainers; [ libadoxon ];
};
})
}
28 changes: 0 additions & 28 deletions nix/light.nix

This file was deleted.

0 comments on commit b97d06e

Please sign in to comment.