diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..9058902 --- /dev/null +++ b/flake.lock @@ -0,0 +1,134 @@ +{ + "nodes": { + "hyprcursor": { + "inputs": { + "hyprlang": "hyprlang", + "nixpkgs": [ + "nixpkgs" + ], + "systems": "systems" + }, + "locked": { + "lastModified": 1721330371, + "narHash": "sha256-aYlHTWylczLt6ERJyg6E66Y/XSCbVL7leVcRuJmVbpI=", + "owner": "hyprwm", + "repo": "hyprcursor", + "rev": "4493a972b48f9c3014befbbf381ed5fff91a65dc", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprcursor", + "type": "github" + } + }, + "hyprlang": { + "inputs": { + "hyprutils": "hyprutils", + "nixpkgs": [ + "hyprcursor", + "nixpkgs" + ], + "systems": [ + "hyprcursor", + "systems" + ] + }, + "locked": { + "lastModified": 1721324361, + "narHash": "sha256-BiJKO0IIdnSwHQBSrEJlKlFr753urkLE48wtt0UhNG4=", + "owner": "hyprwm", + "repo": "hyprlang", + "rev": "adbefbf49664a6c2c8bf36b6487fd31e3eb68086", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprlang", + "type": "github" + } + }, + "hyprutils": { + "inputs": { + "nixpkgs": [ + "hyprcursor", + "hyprlang", + "nixpkgs" + ], + "systems": [ + "hyprcursor", + "hyprlang", + "systems" + ] + }, + "locked": { + "lastModified": 1721324102, + "narHash": "sha256-WAZ0X6yJW1hFG6otkHBfyJDKRpNP5stsRqdEuHrFRpk=", + "owner": "hyprwm", + "repo": "hyprutils", + "rev": "962582a090bc233c4de9d9897f46794280288989", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprutils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1722062969, + "narHash": "sha256-QOS0ykELUmPbrrUGmegAUlpmUFznDQeR4q7rFhl8eQg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b73c2221a46c13557b1b3be9c2070cc42cf01eb3", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "hyprcursor": "hyprcursor", + "nixpkgs": "nixpkgs", + "systems": "systems_2" + } + }, + "systems": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, + "systems_2": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix index 643ac67..d339b73 100644 --- a/flake.nix +++ b/flake.nix @@ -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); + }; } diff --git a/nix/dark.nix b/nix/dark.nix deleted file mode 100644 index ac94c15..0000000 --- a/nix/dark.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ lib, stdenv }: -stdenv.mkDerivation (finalAttrs: { - pname = "mcmojave-hyprcursor"; - version = "0.1"; - src = fetchFromGitHub { - owner = "libadoxon"; - repo = "mcmojave-hyprcursor"; - rev = "d2c0e6802f0ed1e7c638bb27b5aa8587b578d083"; - sha256 = "sha256-ArUX5qlqAXUqcRqHz4QxXy3KgkfasTPA/Qwf6D2kV0U="; - }; - - installPhase = '' - runHook preInstall - - mkdir -p $out/share/icons/mcmojave-hyprcursor - cp -R . $out/share/icons/mcmojave-hyprcursor/ - - runHook postInstall - ''; - - meta = with lib; { - description = "The McMojave cursor theme ported to hyprcusor"; - downloadPage = "https://github.com/ndom91/mcmojave-hyprcursor/releases"; - homepage = "https://rosepinetheme.com/"; - license = licenses.gpl3; - maintainers = with maintainers; [ libadoxon ]; - }; -}) diff --git a/nix/default.nix b/nix/default.nix index bd8f751..eeb6746 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -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 ''; @@ -29,4 +26,4 @@ stdenv.mkDerivation (finalAttrs: { license = licenses.gpl3; maintainers = with maintainers; [ libadoxon ]; }; -}) +} diff --git a/nix/light.nix b/nix/light.nix deleted file mode 100644 index ac94c15..0000000 --- a/nix/light.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ lib, stdenv }: -stdenv.mkDerivation (finalAttrs: { - pname = "mcmojave-hyprcursor"; - version = "0.1"; - src = fetchFromGitHub { - owner = "libadoxon"; - repo = "mcmojave-hyprcursor"; - rev = "d2c0e6802f0ed1e7c638bb27b5aa8587b578d083"; - sha256 = "sha256-ArUX5qlqAXUqcRqHz4QxXy3KgkfasTPA/Qwf6D2kV0U="; - }; - - installPhase = '' - runHook preInstall - - mkdir -p $out/share/icons/mcmojave-hyprcursor - cp -R . $out/share/icons/mcmojave-hyprcursor/ - - runHook postInstall - ''; - - meta = with lib; { - description = "The McMojave cursor theme ported to hyprcusor"; - downloadPage = "https://github.com/ndom91/mcmojave-hyprcursor/releases"; - homepage = "https://rosepinetheme.com/"; - license = licenses.gpl3; - maintainers = with maintainers; [ libadoxon ]; - }; -})