2022-08-23 19:58:33 +02:00
|
|
|
{
|
|
|
|
description = "Hyprpaper is a blazing fast Wayland wallpaper utility with IPC controls";
|
|
|
|
|
2024-01-01 14:22:43 +01:00
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
2024-07-17 16:21:50 +02:00
|
|
|
systems.url = "github:nix-systems/default-linux";
|
2024-01-01 14:22:43 +01:00
|
|
|
|
2024-11-28 16:56:01 +01:00
|
|
|
hyprgraphics = {
|
|
|
|
url = "github:hyprwm/hyprgraphics";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.systems.follows = "systems";
|
|
|
|
inputs.hyprutils.follows = "hyprutils";
|
|
|
|
};
|
|
|
|
|
2024-07-17 16:21:50 +02:00
|
|
|
hyprutils = {
|
|
|
|
url = "github:hyprwm/hyprutils";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.systems.follows = "systems";
|
|
|
|
};
|
2024-03-24 13:38:34 +01:00
|
|
|
|
2024-07-17 16:21:50 +02:00
|
|
|
hyprlang = {
|
|
|
|
url = "github:hyprwm/hyprlang";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.systems.follows = "systems";
|
|
|
|
inputs.hyprutils.follows = "hyprutils";
|
|
|
|
};
|
|
|
|
|
|
|
|
hyprwayland-scanner = {
|
|
|
|
url = "github:hyprwm/hyprwayland-scanner";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.systems.follows = "systems";
|
|
|
|
};
|
2024-01-01 14:22:43 +01:00
|
|
|
};
|
2022-08-23 19:58:33 +02:00
|
|
|
|
|
|
|
outputs = {
|
|
|
|
self,
|
|
|
|
nixpkgs,
|
2024-03-24 13:38:34 +01:00
|
|
|
systems,
|
2022-08-23 19:58:33 +02:00
|
|
|
...
|
2024-01-01 14:22:43 +01:00
|
|
|
} @ inputs: let
|
2022-08-23 19:58:33 +02:00
|
|
|
inherit (nixpkgs) lib;
|
2024-03-24 13:38:34 +01:00
|
|
|
eachSystem = lib.genAttrs (import systems);
|
|
|
|
|
|
|
|
pkgsFor = eachSystem (system:
|
|
|
|
import nixpkgs {
|
|
|
|
localSystem.system = system;
|
|
|
|
overlays = with self.overlays; [hyprpaper];
|
|
|
|
});
|
2022-08-23 19:58:33 +02:00
|
|
|
mkDate = longDate: (lib.concatStringsSep "-" [
|
2024-03-24 13:38:34 +01:00
|
|
|
(builtins.substring 0 4 longDate)
|
|
|
|
(builtins.substring 4 2 longDate)
|
|
|
|
(builtins.substring 6 2 longDate)
|
2022-08-23 19:58:33 +02:00
|
|
|
]);
|
2024-07-18 19:48:30 +02:00
|
|
|
version = lib.removeSuffix "\n" (builtins.readFile ./VERSION);
|
2022-08-23 19:58:33 +02:00
|
|
|
in {
|
2024-03-24 13:38:34 +01:00
|
|
|
overlays = {
|
|
|
|
default = self.overlays.hyprpaper;
|
2024-07-17 16:21:50 +02:00
|
|
|
hyprpaper = lib.composeManyExtensions [
|
2024-11-28 16:56:01 +01:00
|
|
|
inputs.hyprgraphics.overlays.default
|
2024-07-17 16:21:50 +02:00
|
|
|
inputs.hyprlang.overlays.default
|
|
|
|
inputs.hyprutils.overlays.default
|
|
|
|
inputs.hyprwayland-scanner.overlays.default
|
|
|
|
(final: prev: rec {
|
|
|
|
hyprpaper = final.callPackage ./nix/default.nix {
|
|
|
|
stdenv = final.gcc13Stdenv;
|
2024-07-18 19:48:30 +02:00
|
|
|
version = version + "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty");
|
2024-07-17 16:21:50 +02:00
|
|
|
commit = self.rev or "";
|
|
|
|
};
|
|
|
|
hyprpaper-debug = hyprpaper.override {debug = true;};
|
|
|
|
})
|
|
|
|
];
|
2022-08-23 19:58:33 +02:00
|
|
|
};
|
|
|
|
|
2024-03-24 13:38:34 +01:00
|
|
|
packages = eachSystem (system: {
|
|
|
|
default = self.packages.${system}.hyprpaper;
|
|
|
|
inherit (pkgsFor.${system}) hyprpaper hyprpaper-debug;
|
|
|
|
});
|
2022-08-23 19:58:33 +02:00
|
|
|
|
2024-03-11 12:14:35 +01:00
|
|
|
homeManagerModules = {
|
|
|
|
default = self.homeManagerModules.hyprpaper;
|
2024-05-21 19:17:12 +02:00
|
|
|
hyprpaper = builtins.throw "hyprpaper: the flake HM module has been removed. Use the module from Home Manager upstream.";
|
2024-03-11 12:14:35 +01:00
|
|
|
};
|
|
|
|
|
2024-03-24 13:38:34 +01:00
|
|
|
formatter = eachSystem (system: pkgsFor.${system}.alejandra);
|
2022-08-23 19:58:33 +02:00
|
|
|
};
|
|
|
|
}
|