···34{
5 inputs = {
6- # Whenever an upstream change is merged, update this to
7- # the relevant commit and remove the packages from the
8- # ...ToUpstream lists below
9- nixpkgs.url = "github:NixOS/nixpkgs/e80d1b630036fe33badbc168dfcd071d463b92cf";
10- flake-utils.url = "github:numtide/flake-utils";
11 };
1213- outputs = { self, nixpkgs, flake-utils, ... }: flake-utils.lib.eachDefaultSystem (system:
14- let
15- pkgs = nixpkgs.legacyPackages.${system};
16-17- devTools = with pkgs; [
18- # Tools that are required in order to develop with Monado, but that are not required to build Monado itself
19- # These cannot be upstreamed into nixpkgs, as they are not required to build Monado
20- # See https://github.com/NixOS/nix/issues/7501 for a discussion on this
21- clang
22- cmake-format
23- git
24- gradle
25- gradle-completion
26 ];
0000000000002728- nativeBuildInputsToUpstream = with pkgs; [
29- # If there are any nativeBuildInputs that are not in nixpkgs, add them here
30- # nativeBuildInputs are packages that are needed to develop and/or build the project (i.e. tooling)
31- ];
3233- buildInputsToUpstream = with pkgs; [
34- # If there are any buildInputs that are not in nixpkgs, add them here
35- # buildInputs are any packages that are needed at runtime (i.e. dependencies)
36- ];
3738- package = pkgs.monado.overrideAttrs (oldAttrs: {
39- src = ./.;
00004041- nativeBuildInputs = oldAttrs.nativeBuildInputs ++ nativeBuildInputsToUpstream ++ devTools;
42- buildInputs = oldAttrs.buildInputs ++ buildInputsToUpstream;
0000004344- patches = [];
45- });
46- in {
47- packages.default = package;
48- devShells.default = package;
49- }
50- );
51}
···34{
5 inputs = {
6+ # Whenever an upstream change is merged, update this and
7+ # remove the packages from the ...ToUpstream lists below
8+ nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
9+ flake-parts.url = "github:hercules-ci/flake-parts";
010 };
1112+ outputs =
13+ inputs@{ nixpkgs, flake-parts, ... }:
14+ flake-parts.lib.mkFlake { inherit inputs; } {
15+ systems = [
16+ "x86_64-linux"
17+ "aarch64-linux"
18+ "x86_64-darwin"
19+ "aarch64-darwin"
0000020 ];
21+ perSystem =
22+ { pkgs, lib, ... }:
23+ let
24+ devTools = with pkgs; [
25+ # Tools that are required in order to develop with Monado
26+ # but are not required to build Monado itself
27+ clang-tools
28+ cmake-format
29+ git
30+ gradle
31+ gradle-completion
32+ ];
3334+ nativeBuildInputsToUpstream = with pkgs; [
35+ # If there are any nativeBuildInputs that are not in nixpkgs, add them here
36+ # nativeBuildInputs are packages that are needed to develop and/or build the project (i.e. tooling)
37+ ];
3839+ buildInputsToUpstream = with pkgs; [
40+ # If there are any buildInputs that are not in nixpkgs, add them here
41+ # buildInputs are any packages that are needed at runtime (i.e. dependencies)
42+ ];
4344+ package = pkgs.monado.overrideAttrs (oldAttrs: {
45+ src = ./.;
46+47+ nativeBuildInputs = oldAttrs.nativeBuildInputs ++ nativeBuildInputsToUpstream;
48+ buildInputs = oldAttrs.buildInputs ++ buildInputsToUpstream;
49+ cmakeFlags = lib.remove "-DXRT_HAVE_STEAM:BOOL=TRUE" oldAttrs.cmakeFlags;
5051+ patches = [ ];
52+ });
53+ in
54+ {
55+ packages.default = package;
56+ devShells.default = package.overrideAttrs (oldAttrs: {
57+ nativeBuildInputs = oldAttrs.nativeBuildInputs ++ devTools;
58+ });
5960+ formatter = pkgs.nixfmt-rfc-style;
61+ };
62+ };
000063}