79 lines
1.8 KiB
Nix
79 lines
1.8 KiB
Nix
{
|
|
description = "Ambilight development environment";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
};
|
|
|
|
outputs =
|
|
{ self, nixpkgs }:
|
|
let
|
|
supportedSystems = [
|
|
"x86_64-linux"
|
|
"aarch64-linux"
|
|
];
|
|
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
|
pkgsFor = system: nixpkgs.legacyPackages.${system};
|
|
in
|
|
{
|
|
packages = forAllSystems (
|
|
system:
|
|
let
|
|
pkgs = pkgsFor system;
|
|
in
|
|
{
|
|
default = pkgs.rustPlatform.buildRustPackage {
|
|
pname = "ambiligth";
|
|
version = "0.1.0";
|
|
src = ./.;
|
|
cargoLock.lockFile = ./Cargo.lock;
|
|
nativeBuildInputs = with pkgs; [ pkg-config ];
|
|
buildInputs = with pkgs; [
|
|
dbus
|
|
gtk3
|
|
glib
|
|
atk
|
|
pango
|
|
cairo
|
|
gdk-pixbuf
|
|
libappindicator-gtk3
|
|
libayatana-appindicator
|
|
];
|
|
};
|
|
}
|
|
);
|
|
|
|
devShells = forAllSystems (
|
|
system:
|
|
let
|
|
pkgs = pkgsFor system;
|
|
in
|
|
{
|
|
default = pkgs.mkShell {
|
|
packages = with pkgs; [
|
|
pkg-config
|
|
rustc
|
|
cargo
|
|
rustfmt
|
|
clippy
|
|
rustPlatform.bindgenHook
|
|
dbus
|
|
gtk3
|
|
glib
|
|
atk
|
|
pango
|
|
cairo
|
|
gdk-pixbuf
|
|
xdotool
|
|
libappindicator-gtk3
|
|
libayatana-appindicator
|
|
];
|
|
shellHook = ''
|
|
export LD_LIBRARY_PATH="${pkgs.libappindicator-gtk3}/lib:${pkgs.libayatana-appindicator}/lib:$LD_LIBRARY_PATH"
|
|
'';
|
|
};
|
|
}
|
|
);
|
|
};
|
|
}
|