diff --git a/flake.nix b/flake.nix index 0d32496..e0987fc 100644 --- a/flake.nix +++ b/flake.nix @@ -13,21 +13,17 @@ devShells = forEachSystem ( system: let pkgs = pkgsForEach.${system}; - in { - default = pkgs.mkShell { - name = "osu++"; - - nativeBuildInputs = with pkgs; [ - gcc - gnumake - # for clang-format - clang-tools - ]; - - buildInputs = with pkgs; [ - sfml - ]; - }; + in rec { + osuplusplus = import ./nix/shell.nix {inherit pkgs;}; + default = osuplusplus; + } + ); + packages = forEachSystem ( + system: let + pkgs = pkgsForEach.${system}; + in rec { + osuplusplus = import ./nix/default.nix {inherit (pkgs) lib stdenv sfml;}; + default = osuplusplus; } ); }; diff --git a/nix/default.nix b/nix/default.nix new file mode 100644 index 0000000..e2de1b8 --- /dev/null +++ b/nix/default.nix @@ -0,0 +1,21 @@ +{ + lib, + stdenv, + sfml, +}: +stdenv.mkDerivation { + pname = "osu++"; + version = "0.1.0"; + + src = ../.; + + buildInputs = [ + sfml + ]; + + meta = with lib; { + homepage = "https://git.jacekpoz.pl/jacekpoz/osuplusplus"; + description = "An osu client written in C++ using SMFL."; + license = licenses.agpl3; + }; +} diff --git a/nix/shell.nix b/nix/shell.nix new file mode 100644 index 0000000..ed3c3cd --- /dev/null +++ b/nix/shell.nix @@ -0,0 +1,15 @@ +{pkgs}: +pkgs.mkShell { + name = "osu++"; + + nativeBuildInputs = with pkgs; [ + gcc + gnumake + # for clang-format + clang-tools + ]; + + buildInputs = with pkgs; [ + sfml + ]; +}