diff --git a/flake.lock b/flake.lock new file mode 100644 index 000000000..89e9ab5b1 --- /dev/null +++ b/flake.lock @@ -0,0 +1,41 @@ +{ + "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1659877975, + "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1663175074, + "narHash": "sha256-pmujinSiECRsgOWpGlKtTwPEtCv8Y7OYYHgfg/tYdJw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ee55809e3162f9157a7579b59d4b9caf6e931686", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 000000000..58c856d27 --- /dev/null +++ b/flake.nix @@ -0,0 +1,51 @@ +{ + description = "Flake for KeePassXC development"; + + inputs = { + flake-utils = { + url = "github:numtide/flake-utils"; + }; + }; + + outputs = { + self, + nixpkgs, + flake-utils, + }: ( + flake-utils.lib.eachDefaultSystem ( + system: ( + let + pkgs = nixpkgs.legacyPackages.${system}; + in { + devShell = pkgs.mkShell { + buildInputs = with pkgs; + [ + gnumake + cmake + gcc8 + curl + botan2 + xorg.libXtst + xorg.libXi + libargon2 + minizip + pcsclite + qrencode + asciidoctor + libsForQt5.qt5.qtbase + libsForQt5.qt5.qttools + libsForQt5.qt5.qttranslations + libsForQt5.qt5.qtsvg + libsForQt5.qt5.qtx11extras + libsForQt5.qt5.qtwayland + readline + zlib + ] + ++ lib.optional stdenv.isLinux pkgs.libusb1 + ++ lib.optional stdenv.isDarwin pkgs.libsForQt5.qt5.qtmacextras; + }; + } + ) + ) + ); +} diff --git a/shell.nix b/shell.nix deleted file mode 100644 index 23cb8a284..000000000 --- a/shell.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ - withKeePassBrowser ? true, - withKeePassKeeShare ? true, - withKeePassSSHAgent ? true, - withKeePassNetworking ? true, - withKeePassTouchID ? true, - withKeePassYubiKey ? true, - withKeePassFDOSecrets ? true, -}: - -with (import {}); - -mkShell { - buildInputs = [ - curl - botan2 - xorg.libXtst - xorg.libXi - libargon2 - minizip - pcsclite - qrencode - libsForQt5.qt5.qtbase - libsForQt5.qt5.qtsvg - libsForQt5.qt5.qtx11extras - readline - zlib - ] - ++ lib.optional stdenv.isLinux libusb1 - ++ lib.optional stdenv.isDarwin libsForQt5.qt5.qtmacextras; -}