refactor shell out into nix/ and add nix package
This commit is contained in:
parent
8f574a8d39
commit
19910fa8bc
3 changed files with 47 additions and 15 deletions
26
flake.nix
26
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;
|
||||
}
|
||||
);
|
||||
};
|
||||
|
|
21
nix/default.nix
Normal file
21
nix/default.nix
Normal file
|
@ -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;
|
||||
};
|
||||
}
|
15
nix/shell.nix
Normal file
15
nix/shell.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{pkgs}:
|
||||
pkgs.mkShell {
|
||||
name = "osu++";
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
gcc
|
||||
gnumake
|
||||
# for clang-format
|
||||
clang-tools
|
||||
];
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
sfml
|
||||
];
|
||||
}
|
Loading…
Reference in a new issue