From 006651b8147328978345b8651069585b8b56466d Mon Sep 17 00:00:00 2001 From: Aylur Date: Sun, 22 Sep 2024 10:38:24 +0000 Subject: docs: nix derivation for vala --- docs/getting-started/nix.md | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) (limited to 'docs/getting-started/nix.md') diff --git a/docs/getting-started/nix.md b/docs/getting-started/nix.md index f09a80b..2b04bdc 100644 --- a/docs/getting-started/nix.md +++ b/docs/getting-started/nix.md @@ -11,8 +11,8 @@ Using Astal on Nix will require you to package your project. inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; astal = { - inputs.nixpkgs.follows = "nixpkgs"; url = "github:aylur/astal"; + inputs.nixpkgs.follows = "nixpkgs"; }; }; @@ -39,7 +39,39 @@ Using Astal on Nix will require you to package your project. ``` ```nix [ Vala] -# Not documented yet +# keep in mind that this is just the nix derivation +# and you still have to use some build tool like meson +{ + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + astal.url = "github:aylur/astal"; + }; + + outputs = { self, nixpkgs, astal }: let + system = "x86_64-linux"; + pkgs = nixpkgs.legacyPackages.${system}; + in { + packages.${system} = { + default = pkgs.stdenv.mkDerivation { + name = "my-shell"; + src = ./.; + + nativeBuildInputs = with pkgs; [ + meson + ninja + pkg-config + vala + gobject-introspection + ]; + + # add extra packages + buildInputs = [ + astal.packages.${system}.astal + ]; + }; + }; + }; +} ``` ::: -- cgit v1.2.3