2022-12-04 00:44:12 +01:00
|
|
|
{
|
|
|
|
description = "xdg-desktop-portal-hyprland";
|
|
|
|
|
2022-12-04 22:12:57 +01:00
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
|
|
|
|
hyprland-protocols = {
|
|
|
|
url = "github:hyprwm/hyprland-protocols";
|
2023-01-07 19:28:38 +01:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2022-12-04 22:12:57 +01:00
|
|
|
};
|
|
|
|
};
|
2022-12-04 00:44:12 +01:00
|
|
|
|
|
|
|
outputs = {
|
|
|
|
self,
|
|
|
|
nixpkgs,
|
|
|
|
...
|
2022-12-04 22:12:57 +01:00
|
|
|
} @ inputs: let
|
2022-12-04 00:44:12 +01:00
|
|
|
inherit (nixpkgs) lib;
|
|
|
|
genSystems = lib.genAttrs [
|
|
|
|
"aarch64-linux"
|
|
|
|
"x86_64-linux"
|
|
|
|
];
|
2023-05-02 05:10:10 +02:00
|
|
|
pkgsFor = genSystems (system:
|
|
|
|
import nixpkgs {
|
|
|
|
inherit system;
|
|
|
|
overlays = [
|
|
|
|
self.overlays.default
|
|
|
|
inputs.hyprland-protocols.overlays.default
|
|
|
|
];
|
|
|
|
});
|
2022-12-04 00:44:12 +01:00
|
|
|
mkDate = longDate: (lib.concatStringsSep "-" [
|
|
|
|
(builtins.substring 0 4 longDate)
|
|
|
|
(builtins.substring 4 2 longDate)
|
|
|
|
(builtins.substring 6 2 longDate)
|
|
|
|
]);
|
2022-12-09 14:37:23 +01:00
|
|
|
version = "0.pre" + "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty");
|
2022-12-04 00:44:12 +01:00
|
|
|
in {
|
2023-05-02 05:10:10 +02:00
|
|
|
overlays.default = final: prev: {
|
|
|
|
xdg-desktop-portal-hyprland = final.callPackage ./nix/default.nix {
|
|
|
|
inherit (final) hyprland-protocols hyprland-share-picker;
|
|
|
|
inherit version;
|
2022-12-04 00:44:12 +01:00
|
|
|
};
|
2022-12-09 14:37:23 +01:00
|
|
|
|
2023-05-02 05:10:10 +02:00
|
|
|
hyprland-share-picker = final.libsForQt5.callPackage ./nix/hyprland-share-picker.nix {inherit version;};
|
2022-12-04 00:44:12 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
packages = genSystems (system:
|
2023-05-02 05:10:10 +02:00
|
|
|
(self.overlays.default pkgsFor.${system} pkgsFor.${system})
|
2022-12-04 00:44:12 +01:00
|
|
|
// {default = self.packages.${system}.xdg-desktop-portal-hyprland;});
|
|
|
|
|
|
|
|
formatter = genSystems (system: pkgsFor.${system}.alejandra);
|
|
|
|
};
|
|
|
|
}
|