mirror of
https://github.com/hyprwm/hyprland-protocols.git
synced 2024-11-08 06:45:59 +01:00
35 lines
960 B
Nix
35 lines
960 B
Nix
|
{
|
||
|
description = "Hyprland Protocols";
|
||
|
|
||
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||
|
|
||
|
outputs = {
|
||
|
self,
|
||
|
nixpkgs,
|
||
|
...
|
||
|
}: let
|
||
|
inherit (nixpkgs) lib;
|
||
|
genSystems = lib.genAttrs [
|
||
|
"aarch64-linux"
|
||
|
"x86_64-linux"
|
||
|
];
|
||
|
pkgsFor = nixpkgs.legacyPackages;
|
||
|
mkDate = longDate: (lib.concatStringsSep "-" [
|
||
|
(builtins.substring 0 4 longDate)
|
||
|
(builtins.substring 4 2 longDate)
|
||
|
(builtins.substring 6 2 longDate)
|
||
|
]);
|
||
|
version = "0.1" + "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty");
|
||
|
in {
|
||
|
overlays.default = _: prev: {
|
||
|
hyprland-protocols = prev.callPackage ./nix/default.nix {inherit version;};
|
||
|
};
|
||
|
|
||
|
packages = genSystems (system:
|
||
|
(self.overlays.default null pkgsFor.${system})
|
||
|
// {default = self.packages.${system}.hyprland-protocols;});
|
||
|
|
||
|
formatter = genSystems (system: pkgsFor.${system}.alejandra);
|
||
|
};
|
||
|
}
|