hyprcursor/nix/overlays.nix

29 lines
834 B
Nix
Raw Normal View History

2024-03-09 00:46:16 +01:00
{
lib,
inputs,
}: let
mkDate = longDate: (lib.concatStringsSep "-" [
(builtins.substring 0 4 longDate)
(builtins.substring 4 2 longDate)
(builtins.substring 6 2 longDate)
]);
2024-07-18 21:18:35 +02:00
version = lib.removeSuffix "\n" (builtins.readFile ../VERSION);
2024-03-09 00:46:16 +01:00
in {
default = inputs.self.overlays.hyprcursor;
hyprcursor = lib.composeManyExtensions [
inputs.hyprlang.overlays.default
(final: prev: {
hyprcursor = prev.callPackage ./default.nix {
stdenv = prev.gcc14Stdenv;
2024-07-18 21:18:35 +02:00
version = version + "+date=" + (mkDate (inputs.self.lastModifiedDate or "19700101")) + "_" + (inputs.self.shortRev or "dirty");
2024-03-09 00:46:16 +01:00
inherit (final) hyprlang;
};
2024-10-08 22:45:47 +02:00
hyprcursor-with-tests = final.hyprcursor.overrideAttrs (_: _: {
cmakeFlags = [(lib.cmakeBool "INSTALL_TESTS" true)];
});
2024-03-09 00:46:16 +01:00
})
];
}