diff options
author | Aylur <[email protected]> | 2024-07-18 17:16:00 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2024-07-18 17:16:00 +0200 |
commit | 35cd0fb43d30be311cfdfca05f8a6d98d844d284 (patch) | |
tree | 9bc5b29dad306735ae9268b57c19b86125fa76c3 /flake.nix | |
parent | bccb03463fc41f2e6c4305a5565d4158a0f797fe (diff) |
add nix flake (#1)
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..96ffc6f --- /dev/null +++ b/flake.nix @@ -0,0 +1,54 @@ +{ + description = "Wrapper library for WirePlumber"; + + 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 + wireplumber + # json-glib + ]; + in { + packages.${system} = rec { + default = wireplumber; + wireplumber = pkgs.stdenv.mkDerivation { + inherit nativeBuildInputs buildInputs; + pname = "astal-wireplumber"; + version = version; + src = ./.; + outputs = ["out" "dev"]; + }; + }; + + devShells.${system} = { + default = pkgs.mkShell { + inherit nativeBuildInputs buildInputs; + }; + wireplumber = pkgs.mkShell { + inherit nativeBuildInputs; + buildInputs = + buildInputs + ++ [ + self.packages.${system}.default + pkgs.gjs + ]; + }; + }; + }; +} |