diff options
author | Aylur <[email protected]> | 2024-09-01 03:19:54 +0200 |
---|---|---|
committer | Aylur <[email protected]> | 2024-09-01 03:19:54 +0200 |
commit | 8afaaf7e7e2fbca5d65b14e0ea15941c42aa3c26 (patch) | |
tree | 9a4e3c62ce1c40ffb7f637c62a8a5c009701085d /bluetooth/flake.nix | |
parent | 15408c67ea9d2e09fd6e2bbbabbb166c339673ee (diff) | |
parent | c5342a93cc98569695474c692ef40f1e851c2912 (diff) |
merge bluetooth
Diffstat (limited to 'bluetooth/flake.nix')
-rw-r--r-- | bluetooth/flake.nix | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/bluetooth/flake.nix b/bluetooth/flake.nix new file mode 100644 index 0000000..04effee --- /dev/null +++ b/bluetooth/flake.nix @@ -0,0 +1,52 @@ +{ + description = "Library to control bluez over dbus"; + + inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + + outputs = { + self, + nixpkgs, + }: let + version = builtins.replaceStrings ["\n"] [""] (builtins.readFile ./version); + system = "x86_64-linux"; + pkgs = import nixpkgs {inherit system;}; + + nativeBuildInputs = with pkgs; [ + gobject-introspection + meson + pkg-config + ninja + vala + ]; + + buildInputs = with pkgs; [ + glib + ]; + in { + packages.${system} = rec { + default = bluetooth; + bluetooth = pkgs.stdenv.mkDerivation { + inherit nativeBuildInputs buildInputs; + pname = "astal-bluetooth"; + version = version; + src = ./.; + outputs = ["out" "dev"]; + }; + }; + + devShells.${system} = { + default = pkgs.mkShell { + inherit nativeBuildInputs buildInputs; + }; + bluetooth = pkgs.mkShell { + inherit nativeBuildInputs; + buildInputs = + buildInputs + ++ [ + self.packages.${system}.default + pkgs.gjs + ]; + }; + }; + }; +} |