commit 7ad351f85a92fee40806cb81777430c33499be41 Author: Cookiez Date: Wed Mar 25 10:51:43 2026 +0100 Initial commit diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..a2fb165 --- /dev/null +++ b/flake.nix @@ -0,0 +1,49 @@ +{ + description = "PAM module for simultaneous fingerprint and password auth"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + + pam-fprint-src = { + url = "gitlab:mishakmak/pam-fprint-grosshack"; + flake = false; # ← treats it as raw source, not a flake + }; + }; + + outputs = { + self, + nixpkgs, + pam-fprint-src, + }: let + systems = ["x86_64-linux" "aarch64-linux"]; + forAllSystems = f: nixpkgs.lib.genAttrs systems f; + in { + packages = forAllSystems ( + system: let + pkgs = nixpkgs.legacyPackages.${system}; + in { + default = pkgs.stdenv.mkDerivation { + pname = "pam-fprint-grosshack"; + version = "0.3.0"; + + src = pam-fprint-src; # ← upstream source, no hash! + + nativeBuildInputs = with pkgs; [meson ninja pkg-config libpam-wrapper]; + buildInputs = with pkgs; [pam fprintd glib dbus libfprint polkit systemd]; + + mesonFlags = [ + "--prefix=${placeholder "out"}" + "-Dpam_modules_dir=${placeholder "out"}/lib/security" + "-Dsystemd=false" + "-Dman=false" + ]; + + meta = { + description = "PAM module for simultaneous fingerprint and password auth"; + license = nixpkgs.lib.licenses.gpl2; + }; + }; + } + ); + }; +}