diff options
author | kotontrion <[email protected]> | 2024-05-21 13:08:51 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2024-05-21 13:08:51 +0200 |
commit | 33b3b60ee513ce2d313ce31c292afc114a110eb3 (patch) | |
tree | ce63b21d13c2fcdbb9c6f6fee5b583c15654315f /flake.nix | |
parent | 611f7ec8154869c4dc131feb6b082d3a890c369e (diff) | |
parent | 0a209680c532bab47e99e07bc090240bf851c218 (diff) |
Merge pull request #1 from astal-sh/nix-flake
add flake.nix
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..39b0289 --- /dev/null +++ b/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; + }; + }; + }; +} |