2021-11-20 01:36:34 +00:00
|
|
|
{
|
|
|
|
description = "sway/i3bar command in Rust";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
|
|
|
utils.url = "github:numtide/flake-utils";
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = { self, nixpkgs, utils }:
|
|
|
|
let
|
2021-11-20 03:50:10 +00:00
|
|
|
supportedSystems = [ "x86_64-linux" "aarch64-linux" ];
|
2021-11-20 01:36:34 +00:00
|
|
|
in
|
2021-11-20 03:50:10 +00:00
|
|
|
(utils.lib.eachSystem supportedSystems (system:
|
2021-11-20 01:36:34 +00:00
|
|
|
let pkgs = import nixpkgs { inherit system; };
|
|
|
|
in
|
|
|
|
rec {
|
|
|
|
packages.rustybar = with pkgs; rustPlatform.buildRustPackage rec {
|
|
|
|
name = "rustybar";
|
|
|
|
version = "0.1";
|
|
|
|
src = ./.;
|
|
|
|
cargoLock.lockFile = ./Cargo.lock;
|
|
|
|
RUSTC_BOOTSTRAP = 1;
|
|
|
|
doCheck = false;
|
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [ dbus ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/mildlyfunctionalgays/rustybar";
|
|
|
|
description = "swaybar/i3bar command in Rust";
|
|
|
|
maintainers = with maintainers; [ artemist ];
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
platforms = supportedSystems;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
defaultPackage = packages.rustybar;
|
|
|
|
|
|
|
|
apps.rustybar = utils.lib.mkApp { drv = packages.rustybar; };
|
|
|
|
defaultApp = apps.rustybar;
|
|
|
|
|
2021-11-20 03:19:25 +00:00
|
|
|
overlay = final: prev: {
|
|
|
|
inherit (packages) rustybar;
|
|
|
|
};
|
|
|
|
|
2021-11-20 01:36:34 +00:00
|
|
|
devShells.rustybar = with pkgs; mkShell {
|
|
|
|
packages = [ pkgconfig dbus rustup ];
|
|
|
|
};
|
|
|
|
devShell = devShells.rustybar;
|
2021-11-20 03:50:10 +00:00
|
|
|
})) // {
|
|
|
|
overlay = final: prev: {
|
|
|
|
inherit (self.packages."${prev.system}") rustybar;
|
|
|
|
};
|
|
|
|
};
|
2021-11-20 01:36:34 +00:00
|
|
|
}
|