Fix nix stuff

This commit is contained in:
Ben Mayer 2024-07-27 23:36:34 +00:00
parent 8e2507d4f6
commit b97d06e427
5 changed files with 161 additions and 84 deletions

134
flake.lock generated Normal file
View file

@ -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
}

View file

@ -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:
hyprcursor,
systems,
...
}@inputs:
let
pkgs = import nixpkgs { inherit system; };
pkgs = nixpkgs;
eachSystem = pkgs.lib.genAttrs (import systems);
in
{
packages = {
mcmojave-hyprcursor-light = pkgs.callPackage ./nix/light.nix { inherit pkgs; };
mcmojave-hyprcursor-dark = pkgs.callPackage ./nix/dark.nix { inherit pkgs; };
};
packages = eachSystem (system: {
default = self.packages.${system}.mcmojave-hyprcursor;
formatter = nixpkgs.${system}.nixpkgs-fmt;
}
);
mcmojave-hyprcursor = inputs.nixpkgs.legacyPackages.${system}.callPackage ./nix {
inherit hyprcursor;
};
});
formatter = eachSystem (system: nixpkgs.${system}.nixpkgs-format);
};
}

View file

@ -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 ];
};
})

View file

@ -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 ];
};
})
}

View file

@ -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 ];
};
})