diff options
author | Aylur <[email protected]> | 2024-09-22 10:38:24 +0000 |
---|---|---|
committer | Aylur <[email protected]> | 2024-09-23 13:27:56 +0200 |
commit | 006651b8147328978345b8651069585b8b56466d (patch) | |
tree | 4c033e6c1a38e3aea90be7a1f31c5b0290f2dcf5 /docs/getting-started/nix.md | |
parent | 8cab7d039e2cf783033a5f1f26cf8be42b0d158e (diff) |
docs: nix derivation for vala
Diffstat (limited to 'docs/getting-started/nix.md')
-rw-r--r-- | docs/getting-started/nix.md | 36 |
1 files changed, 34 insertions, 2 deletions
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 [<i class="devicon-vala-plain"></i> 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 + ]; + }; + }; + }; +} ``` ::: |