summaryrefslogtreecommitdiff
path: root/auth/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'auth/flake.nix')
-rw-r--r--auth/flake.nix42
1 files changed, 42 insertions, 0 deletions
diff --git a/auth/flake.nix b/auth/flake.nix
new file mode 100644
index 0000000..39b0289
--- /dev/null
+++ b/auth/flake.nix
@@ -0,0 +1,42 @@
+{
+ description = "Authentication library and cli tool";
+
+ inputs.nixpkgs.url = "github:nixos/nixpkgs?ref=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
+ pam
+ ];
+ in {
+ packages.${system} = rec {
+ default = auth;
+ auth = pkgs.stdenv.mkDerivation {
+ inherit nativeBuildInputs buildInputs;
+ pname = "astal-auth";
+ version = version;
+ src = ./.;
+ outputs = ["out" "dev"];
+ };
+ };
+
+ devShells.${system} = {
+ default = pkgs.mkShell {
+ inherit nativeBuildInputs buildInputs;
+ };
+ };
+ };
+}