summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorAylur <[email protected]>2024-05-19 02:39:53 +0200
committerAylur <[email protected]>2024-05-19 02:39:53 +0200
commit1425b396b08f0e91d45bbd0f92b1309115c7c870 (patch)
tree8af1a899a14d8a01a9ef50e248c077b48aed25bc /flake.nix
init 0.1.0
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix58
1 files changed, 58 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..79d8180
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,58 @@
+{
+ 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; [
+ wrapGAppsHook
+ gobject-introspection
+ meson
+ pkg-config
+ ninja
+ vala
+ ];
+
+ buildInputs = with pkgs; [
+ glib
+ gtk3
+ gtk-layer-shell
+ ];
+ in {
+ packages.${system} = rec {
+ default = astal;
+ astal = pkgs.stdenv.mkDerivation {
+ inherit nativeBuildInputs buildInputs;
+ pname = "astal";
+ version = version;
+ src = ./.;
+ outputs = ["out" "dev"];
+ };
+ };
+
+ devShells.${system} = let
+ inputs = with pkgs; buildInputs ++ [
+ (lua.withPackages(ps: [ps.lgi]))
+ (python3.withPackages(ps: [ps.pygobject3]))
+ gjs
+ deno
+ nodejs
+ ];
+ in {
+ default = pkgs.mkShell {
+ inherit nativeBuildInputs;
+ buildInputs = inputs;
+ };
+ astal = pkgs.mkShell {
+ inherit nativeBuildInputs;
+ buildInputs = inputs ++ [
+ self.packages.${system}.astal
+ pkgs.playerctl # FIXME: just for demo
+ ];
+ };
+ };
+ };
+}