2022-09-02 18:34:15 +02:00
|
|
|
{
|
|
|
|
description = "Hyprpicker - a wlroots-compatible Wayland color picker that does not suck";
|
|
|
|
|
2024-07-18 19:58:37 +02:00
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
systems.url = "github:nix-systems/default-linux";
|
|
|
|
|
|
|
|
hyprutils = {
|
|
|
|
url = "github:hyprwm/hyprutils";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.systems.follows = "systems";
|
|
|
|
};
|
2024-09-26 13:58:43 +02:00
|
|
|
|
|
|
|
hyprwayland-scanner = {
|
|
|
|
url = "github:hyprwm/hyprwayland-scanner";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.systems.follows = "systems";
|
|
|
|
};
|
2024-07-18 19:58:37 +02:00
|
|
|
};
|
2022-09-02 18:34:15 +02:00
|
|
|
|
|
|
|
outputs = {
|
|
|
|
self,
|
|
|
|
nixpkgs,
|
2024-07-18 19:58:37 +02:00
|
|
|
systems,
|
2022-09-02 18:34:15 +02:00
|
|
|
...
|
2024-07-18 19:58:37 +02:00
|
|
|
} @ inputs: let
|
2022-09-02 18:34:15 +02:00
|
|
|
inherit (nixpkgs) lib;
|
2024-07-18 19:58:37 +02:00
|
|
|
eachSystem = lib.genAttrs (import systems);
|
|
|
|
pkgsFor = eachSystem (system:
|
|
|
|
import nixpkgs {
|
|
|
|
localSystem.system = system;
|
|
|
|
overlays = with self.overlays; [hyprpicker];
|
|
|
|
});
|
2022-09-02 18:34:15 +02:00
|
|
|
mkDate = longDate: (lib.concatStringsSep "-" [
|
2024-03-24 13:24:13 +01:00
|
|
|
(builtins.substring 0 4 longDate)
|
|
|
|
(builtins.substring 4 2 longDate)
|
|
|
|
(builtins.substring 6 2 longDate)
|
2022-09-02 18:34:15 +02:00
|
|
|
]);
|
2024-07-18 19:52:39 +02:00
|
|
|
version = lib.removeSuffix "\n" (builtins.readFile ./VERSION);
|
2022-09-02 18:34:15 +02:00
|
|
|
in {
|
2024-07-18 19:58:37 +02:00
|
|
|
overlays = {
|
|
|
|
default = self.overlays.hyprpicker;
|
|
|
|
hyprpicker = lib.composeManyExtensions [
|
|
|
|
inputs.hyprutils.overlays.default
|
2024-09-26 13:58:43 +02:00
|
|
|
inputs.hyprwayland-scanner.overlays.default
|
2024-07-18 19:58:37 +02:00
|
|
|
(final: prev: {
|
|
|
|
hyprpicker = prev.callPackage ./nix/default.nix {
|
2024-12-16 22:26:55 +01:00
|
|
|
stdenv = prev.gcc14Stdenv;
|
2024-07-18 19:58:37 +02:00
|
|
|
version = version + "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty");
|
2024-03-24 13:24:13 +01:00
|
|
|
};
|
2024-07-18 19:58:37 +02:00
|
|
|
hyprpicker-debug = final.hyprpicker.override {debug = true;};
|
|
|
|
})
|
|
|
|
];
|
2022-09-02 18:34:15 +02:00
|
|
|
};
|
|
|
|
|
2024-07-18 19:58:37 +02:00
|
|
|
packages = eachSystem (system: {
|
|
|
|
default = self.packages.${system}.hyprpicker;
|
|
|
|
inherit (pkgsFor.${system}) hyprpicker hyprpicker-debug;
|
|
|
|
});
|
2022-09-02 18:34:15 +02:00
|
|
|
|
2024-07-18 19:58:37 +02:00
|
|
|
formatter = eachSystem (system: pkgsFor.${system}.alejandra);
|
2022-09-02 18:34:15 +02:00
|
|
|
};
|
|
|
|
}
|