mirror of
https://github.com/scorpion-26/gBar.git
synced 2024-11-21 18:52:49 +00:00
Add nix support (#9)
add nix support via a flake. Flake tested and builds successfully.
This commit is contained in:
parent
d8eae96e50
commit
8238182edb
4 changed files with 95 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -2,3 +2,4 @@
|
|||
.cache
|
||||
build
|
||||
compile_commands.json
|
||||
result
|
||||
|
|
|
@ -29,6 +29,8 @@ My personal blazingly fast and efficient status bar + widgets, in case anyone fi
|
|||
```
|
||||
ninja -C build && sudo ninja -C build install
|
||||
```
|
||||
## Nix
|
||||
You can install the nix flake in a number of ways, either through your system/home flake or simply running nix build to get the binary directly.
|
||||
|
||||
## Building and installation (AUR)
|
||||
For Arch systems, gBar can be found on the AUR.
|
||||
|
|
43
flake.lock
Normal file
43
flake.lock
Normal file
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1676283394,
|
||||
"narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1677262115,
|
||||
"narHash": "sha256-DPkHiJw2QnKYAzQXBlwelwghxbcD5oigK2kLPHMpMQ8=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "806075be2bdde71895359ed18cb530c4d323e6f6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
49
flake.nix
Normal file
49
flake.nix
Normal file
|
@ -0,0 +1,49 @@
|
|||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils, ... }: flake-utils.lib.eachSystem ["x86_64-linux"] (system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
};
|
||||
|
||||
gbar = (with pkgs; stdenv.mkDerivation {
|
||||
|
||||
name = "gbar";
|
||||
|
||||
src = ./.;
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
meson
|
||||
cmake
|
||||
ninja
|
||||
];
|
||||
buildInputs = [
|
||||
wayland
|
||||
bluez
|
||||
gtk3
|
||||
gtk-layer-shell
|
||||
libpulseaudio
|
||||
];
|
||||
|
||||
|
||||
});
|
||||
in rec {
|
||||
defaultApp = flake-utils.lib.mkApp {
|
||||
drv = defaultPackage;
|
||||
};
|
||||
defaultPackage = gbar;
|
||||
devShell = pkgs.mkShell {
|
||||
buildInputs = [
|
||||
gbar
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in a new issue