hyprpaper/flake.nix

59 lines
1.6 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";
2024-03-24 13:38:34 +01:00
systems.url = "github:nix-systems/default-linux";
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
]);
in {
2024-03-24 13:38:34 +01:00
overlays = {
default = self.overlays.hyprpaper;
hyprpaper = final: prev: rec {
hyprpaper = final.callPackage ./nix/default.nix {
stdenv = final.gcc13Stdenv;
version = "0.pre" + "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty");
2024-05-05 14:04:53 +02:00
commit = self.rev or "";
2024-03-24 13:38:34 +01:00
inherit (final.xorg) libXdmcp;
inherit (inputs.hyprlang.packages.${final.system}) hyprlang;
};
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;
hyprpaper = import ./nix/hm-module.nix self;
};
2024-03-24 13:38:34 +01:00
formatter = eachSystem (system: pkgsFor.${system}.alejandra);
2022-08-23 19:58:33 +02:00
};
}