commit
e6097229ce
|
@ -18,11 +18,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1701253981,
|
||||
"narHash": "sha256-ztaDIyZ7HrTAfEEUt9AtTDNoCYxUdSd6NrRHaYOIxtk=",
|
||||
"lastModified": 1704538339,
|
||||
"narHash": "sha256-1734d3mQuux9ySvwf6axRWZRBhtcZA9Q8eftD6EZg6U=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e92039b55bcd58469325ded85d4f58dd5a4eaf58",
|
||||
"rev": "46ae0210ce163b3cba6c7da08840c1d63de9c701",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
46
flake.nix
46
flake.nix
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
description = "Highly customizable Wayland bar for Sway and Wlroots based compositors.";
|
||||
description = "Highly customizable Wayland bar for Sway and Wlroots based compositors";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
|
@ -15,7 +15,8 @@
|
|||
genSystems = func: lib.genAttrs [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
] (system: func (import nixpkgs { inherit system; }));
|
||||
]
|
||||
(system: func (import nixpkgs { inherit system; }));
|
||||
|
||||
mkDate = longDate: (lib.concatStringsSep "-" [
|
||||
(builtins.substring 0 4 longDate)
|
||||
|
@ -24,6 +25,27 @@
|
|||
]);
|
||||
in
|
||||
{
|
||||
devShells = genSystems
|
||||
(pkgs:
|
||||
{
|
||||
default =
|
||||
pkgs.mkShell
|
||||
{
|
||||
name = "waybar-shell";
|
||||
|
||||
# inherit attributes from upstream nixpkgs derivation
|
||||
inherit (pkgs.waybar) buildInputs depsBuildBuild depsBuildBuildPropagated depsBuildTarget
|
||||
depsBuildTargetPropagated depsHostHost depsHostHostPropagated depsTargetTarget
|
||||
depsTargetTargetPropagated propagatedBuildInputs propagatedNativeBuildInputs strictDeps;
|
||||
|
||||
# overrides for local development
|
||||
nativeBuildInputs = pkgs.waybar.nativeBuildInputs ++ (with pkgs; [
|
||||
clang-tools
|
||||
gdb
|
||||
]);
|
||||
};
|
||||
});
|
||||
|
||||
overlays.default = final: prev: {
|
||||
waybar = final.callPackage ./nix/default.nix {
|
||||
# take the first "version: '...'" from meson.build
|
||||
|
@ -35,27 +57,11 @@
|
|||
+ "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty");
|
||||
};
|
||||
};
|
||||
|
||||
packages = genSystems (pkgs:
|
||||
let packages = self.overlays.default pkgs pkgs;
|
||||
in packages // {
|
||||
default = packages.waybar;
|
||||
});
|
||||
} //
|
||||
genSystems (pkgs: {
|
||||
devShells.default =
|
||||
pkgs.mkShell {
|
||||
name = "waybar-shell";
|
||||
|
||||
# most of these aren't actually used in the waybar derivation, this is just in case
|
||||
# they will ever start being used
|
||||
inherit (pkgs.waybar) buildInputs depsBuildBuild depsBuildBuildPropagated depsBuildTarget
|
||||
depsBuildTargetPropagated depsHostHost depsHostHostPropagated depsTargetTarget
|
||||
depsTargetTargetPropagated propagatedBuildInputs propagatedNativeBuildInputs strictDeps;
|
||||
|
||||
nativeBuildInputs = pkgs.waybar.nativeBuildInputs ++ (with pkgs; [
|
||||
clang-tools
|
||||
gdb
|
||||
]);
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,9 +1,20 @@
|
|||
{ lib
|
||||
, pkgs
|
||||
, waybar
|
||||
, version
|
||||
}:
|
||||
|
||||
waybar.overrideAttrs (prev: {
|
||||
let
|
||||
catch2_3 = {
|
||||
src = pkgs.fetchFromGitHub
|
||||
{
|
||||
owner = "catchorg";
|
||||
repo = "Catch2";
|
||||
rev = "v3.5.1";
|
||||
hash = "sha256-OyYNUfnu6h1+MfCF8O+awQ4Usad0qrdCtdZhYgOY+Vw=";
|
||||
};
|
||||
};
|
||||
in
|
||||
(waybar.overrideAttrs (oldAttrs: rec {
|
||||
inherit version;
|
||||
|
||||
src = lib.cleanSourceWith {
|
||||
|
@ -11,3 +22,9 @@ waybar.overrideAttrs (prev: {
|
|||
src = lib.cleanSource ../.;
|
||||
};
|
||||
})
|
||||
).override {
|
||||
catch2_3 = pkgs.catch2_3.overrideAttrs (oldAttrs: {
|
||||
version = "3.5.1";
|
||||
src = catch2_3.src;
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue