added nix flake taken from the McMojave-hyprcursor

This commit is contained in:
Nickiel12 2024-12-09 20:11:13 -08:00
parent 7d0bfc1f91
commit 3730719c2e
3 changed files with 99 additions and 0 deletions

43
flake.lock Normal file
View file

@ -0,0 +1,43 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1733581040,
"narHash": "sha256-Qn3nPMSopRQJgmvHzVqPcE3I03zJyl8cSbgnnltfFDY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "22c3f2cf41a0e70184334a958e6b124fb0ce3e01",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs",
"systems": "systems"
}
},
"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"
}
}
},
"root": "root",
"version": 7
}

29
flake.nix Normal file
View file

@ -0,0 +1,29 @@
{
description = "The McMojave xcursor theme packages for NixOS";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
systems.url = "github:nix-systems/default-linux";
};
outputs =
{
self,
nixpkgs,
systems,
...
}@inputs:
let
pkgs = nixpkgs;
eachSystem = pkgs.lib.genAttrs (import systems);
in
{
packages = eachSystem (system: {
default = self.packages.${system}.mcmojave-xcursor;
mcmojave-xcursor = inputs.nixpkgs.legacyPackages.${system}.callPackage ./nix {};
});
formatter = eachSystem (system: nixpkgs.${system}.nixpkgs-format);
};
}

27
nix/default.nix Normal file
View file

@ -0,0 +1,27 @@
{
lib,
stdenv,
}:
stdenv.mkDerivation {
pname = "mcmojave-xcursor";
version = "0.1";
src = ../.;
# Shamelessly copied flake from https://github.com/Libadoxon/mcmojave-hyprcursor/blob/main/nix/default.nix
installPhase = ''
runHook preInstall
mkdir -p $out/share/icons/
mkdir -p $out/share/icons/McMojave-cursors
cp $src/dist/* -r $out/share/icons/McMojave-cursors
runHook postInstall
'';
meta = with lib; {
description = "The McMojave xcursor theme packaged for NixOS";
license = licenses.gpl3;
maintainers = with maintainers; [ Nickiel12 ];
};
}