summaryrefslogtreecommitdiff
path: root/auth/flake.nix
diff options
context:
space:
mode:
authorAylur <[email protected]>2024-09-01 03:19:31 +0200
committerAylur <[email protected]>2024-09-01 03:19:31 +0200
commit15408c67ea9d2e09fd6e2bbbabbb166c339673ee (patch)
tree4837656ef99c1860607efd720b5190377fc92b1a /auth/flake.nix
parentdb0409915c8e161eb5e8a04938fb8b24f2393ddd (diff)
parent6adcd2884ee48ec0b1c8b7486e42b2eeffc48159 (diff)
merge auth
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;
+ };
+ };
+ };
+}