mirror of
https://github.com/hyprwm/hyprutils.git
synced 2026-03-22 04:00:33 +01:00
treewide: alejandra -> nixfmt
This commit is contained in:
parent
340a792e3b
commit
e63f3a7933
2 changed files with 39 additions and 29 deletions
45
flake.nix
45
flake.nix
|
|
@ -6,26 +6,31 @@
|
|||
systems.url = "github:nix-systems/default-linux";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
systems,
|
||||
}: let
|
||||
inherit (nixpkgs) lib;
|
||||
eachSystem = lib.genAttrs (import systems);
|
||||
pkgsFor = eachSystem (system:
|
||||
import nixpkgs {
|
||||
localSystem.system = system;
|
||||
overlays = with self.overlays; [hyprutils];
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
systems,
|
||||
}:
|
||||
let
|
||||
inherit (nixpkgs) lib;
|
||||
eachSystem = lib.genAttrs (import systems);
|
||||
pkgsFor = eachSystem (
|
||||
system:
|
||||
import nixpkgs {
|
||||
localSystem.system = system;
|
||||
overlays = with self.overlays; [ hyprutils ];
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
overlays = import ./nix/overlays.nix { inherit self lib; };
|
||||
|
||||
packages = eachSystem (system: {
|
||||
default = self.packages.${system}.hyprutils;
|
||||
inherit (pkgsFor.${system}) hyprutils hyprutils-debug hyprutils-with-tests;
|
||||
});
|
||||
in {
|
||||
overlays = import ./nix/overlays.nix {inherit self lib;};
|
||||
|
||||
packages = eachSystem (system: {
|
||||
default = self.packages.${system}.hyprutils;
|
||||
inherit (pkgsFor.${system}) hyprutils hyprutils-debug hyprutils-with-tests;
|
||||
});
|
||||
|
||||
formatter = eachSystem (system: pkgsFor.${system}.alejandra);
|
||||
};
|
||||
formatter = eachSystem (system: pkgsFor.${system}.nixfmt-tree);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,23 +1,28 @@
|
|||
{
|
||||
self,
|
||||
lib,
|
||||
}: let
|
||||
mkDate = longDate: (lib.concatStringsSep "-" [
|
||||
(builtins.substring 0 4 longDate)
|
||||
(builtins.substring 4 2 longDate)
|
||||
(builtins.substring 6 2 longDate)
|
||||
]);
|
||||
}:
|
||||
let
|
||||
mkDate =
|
||||
longDate:
|
||||
(lib.concatStringsSep "-" [
|
||||
(builtins.substring 0 4 longDate)
|
||||
(builtins.substring 4 2 longDate)
|
||||
(builtins.substring 6 2 longDate)
|
||||
]);
|
||||
|
||||
ver = lib.removeSuffix "\n" (builtins.readFile ../VERSION);
|
||||
version = ver + "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty");
|
||||
in {
|
||||
version =
|
||||
ver + "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty");
|
||||
in
|
||||
{
|
||||
default = self.overlays.hyprutils;
|
||||
hyprutils = final: prev: {
|
||||
hyprutils = final.callPackage ./default.nix {
|
||||
stdenv = final.gcc15Stdenv;
|
||||
inherit version;
|
||||
};
|
||||
hyprutils-debug = final.hyprutils.override {debug = true;};
|
||||
hyprutils-debug = final.hyprutils.override { debug = true; };
|
||||
hyprutils-with-tests = final.hyprutils-debug;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue