diff options
author | Zoe Roux <[email protected]> | 2024-07-13 18:03:57 +0700 |
---|---|---|
committer | GitHub <[email protected]> | 2024-07-13 13:03:57 +0200 |
commit | 1296dc824446984038c08a2278ebeea1c537ebf7 (patch) | |
tree | 037ebbf864ab217bc1d70f87042c67066adb6225 /flake.nix | |
parent | faf40c60dc60683fa3698d15bb6955f1f5ea6185 (diff) |
Add 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..766263f --- /dev/null +++ b/flake.nix @@ -0,0 +1,54 @@ +{ + description = "Library and cli tool for querying river"; + + 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 + wayland + ]; + + buildInputs = with pkgs; [ + glib + json-glib + ]; + in { + packages.${system} = rec { + default = river; + river = pkgs.stdenv.mkDerivation { + inherit nativeBuildInputs buildInputs; + pname = "astal-river"; + version = version; + src = ./.; + outputs = ["out" "dev"]; + }; + }; + + devShells.${system} = { + default = pkgs.mkShell { + inherit nativeBuildInputs buildInputs; + }; + river = pkgs.mkShell { + inherit nativeBuildInputs; + buildInputs = + buildInputs + ++ [ + pkgs.gjs + self.packages.${system}.default + ]; + }; + }; + }; +} |