hyprpaper/flake.nix

45 lines
1.3 KiB
Nix
Raw Normal View History

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";
hyprlang.url = "github:hyprwm/hyprlang";
};
2022-08-23 19:58:33 +02:00
outputs = {
self,
nixpkgs,
...
2024-01-01 14:22:43 +01:00
} @ inputs: let
2022-08-23 19:58:33 +02:00
inherit (nixpkgs) lib;
genSystems = lib.genAttrs [
# Add more systems if they are supported
"x86_64-linux"
2023-04-02 11:43:55 +02:00
"aarch64-linux"
2022-08-23 19:58:33 +02:00
];
pkgsFor = nixpkgs.legacyPackages;
mkDate = longDate: (lib.concatStringsSep "-" [
(__substring 0 4 longDate)
(__substring 4 2 longDate)
(__substring 6 2 longDate)
]);
in {
overlays.default = _: prev: rec {
hyprpaper = prev.callPackage ./nix/default.nix {
2024-01-02 22:19:42 +01:00
stdenv = prev.gcc13Stdenv;
2022-08-23 19:58:33 +02:00
version = "0.pre" + "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty");
inherit (prev.xorg) libXdmcp;
2024-01-01 14:22:43 +01:00
inherit (inputs.hyprlang.packages.${prev.system}) hyprlang;
2022-08-23 19:58:33 +02:00
};
hyprpaper-debug = hyprpaper.override {debug = true;};
};
packages = genSystems (system:
(self.overlays.default null pkgsFor.${system})
// {default = self.packages.${system}.hyprpaper;});
formatter = genSystems (system: pkgsFor.${system}.alejandra);
};
}