2022-12-23 23:59:07 +01:00
|
|
|
{
|
|
|
|
description = "Hyprland Protocols";
|
|
|
|
|
2023-08-11 13:36:36 +02:00
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
# <https://github.com/nix-systems/nix-systems>
|
|
|
|
systems.url = "github:nix-systems/default-linux";
|
|
|
|
};
|
2022-12-23 23:59:07 +01:00
|
|
|
|
|
|
|
outputs = {
|
|
|
|
self,
|
|
|
|
nixpkgs,
|
2023-08-11 13:36:36 +02:00
|
|
|
systems,
|
2022-12-23 23:59:07 +01:00
|
|
|
...
|
|
|
|
}: let
|
|
|
|
inherit (nixpkgs) lib;
|
2023-08-11 13:36:36 +02:00
|
|
|
eachSystem = lib.genAttrs (import systems);
|
|
|
|
pkgsFor = eachSystem (system:
|
2023-05-02 05:03:46 +02:00
|
|
|
import nixpkgs {
|
2023-08-11 13:36:36 +02:00
|
|
|
localSystem = system;
|
|
|
|
overlays = [self.overlays.hyprland-protocols];
|
2023-05-02 05:03:46 +02:00
|
|
|
});
|
2022-12-23 23:59:07 +01:00
|
|
|
mkDate = longDate: (lib.concatStringsSep "-" [
|
|
|
|
(builtins.substring 0 4 longDate)
|
|
|
|
(builtins.substring 4 2 longDate)
|
|
|
|
(builtins.substring 6 2 longDate)
|
|
|
|
]);
|
2024-07-18 20:14:43 +02:00
|
|
|
version = lib.removeSuffix "\n" (builtins.readFile ./VERSION);
|
2022-12-23 23:59:07 +01:00
|
|
|
in {
|
2023-08-11 13:36:36 +02:00
|
|
|
overlays = {
|
|
|
|
hyprland-protocols = final: prev: {
|
|
|
|
hyprland-protocols = final.callPackage ./nix/default.nix {inherit version;};
|
2024-07-18 20:14:43 +02:00
|
|
|
version = version + "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty");
|
2023-08-11 13:36:36 +02:00
|
|
|
};
|
|
|
|
default = self.overlays.hyprland-protocols;
|
2022-12-23 23:59:07 +01:00
|
|
|
};
|
|
|
|
|
2023-08-11 13:36:36 +02:00
|
|
|
packages = eachSystem (system: {
|
|
|
|
inherit (pkgsFor.${system}) hyprland-protocols;
|
|
|
|
default = self.packages.${system}.hyprland-protocols;
|
|
|
|
});
|
2022-12-23 23:59:07 +01:00
|
|
|
|
2023-08-11 13:36:36 +02:00
|
|
|
formatter = eachSystem (system: nixpkgs.legacyPackages.${system}.alejandra);
|
2022-12-23 23:59:07 +01:00
|
|
|
};
|
|
|
|
}
|