Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 23 additions & 13 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};

treefmt-nix = {
url = "github:numtide/treefmt-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
wlroots-flake = {
url = "git+https://github.com/SimulaVR/wlroots?rev=e44903dee9e2e68219799699c38536e7d9961294&submodules=1";
url = "git+https://github.com/SimulaVR/wlroots?rev=e44903dee9e2e68219799699c38536e7d9961294&submodules=1";
inputs.nixpkgs.follows = "nixpkgs";
flake = true;
flake = true;
};
};

Expand All @@ -19,6 +22,8 @@
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = import inputs.systems;

imports = [ inputs.treefmt-nix.flakeModule ];

perSystem =
{
pkgs,
Expand All @@ -27,13 +32,13 @@
...
}:
let
gdwlroots = pkgs.fetchFromGitHub {
owner = "SimulaVR";
repo = "gdwlroots";
rev = "f5add51f7b5055892177551a341eea510689d19b";
hash = "sha256-1dIfXA0yWmcX4pZ84bD/Og39tl300YNeiTsWRLV7xh4=";
};
wlroots = inputs.wlroots-flake.packages.${system}.default;
gdwlroots = pkgs.fetchFromGitHub {
owner = "SimulaVR";
repo = "gdwlroots";
rev = "f5add51f7b5055892177551a341eea510689d19b";
hash = "sha256-1dIfXA0yWmcX4pZ84bD/Og39tl300YNeiTsWRLV7xh4=";
};
wlroots = inputs.wlroots-flake.packages.${system}.default;

libxcb-errors = pkgs.stdenv.mkDerivation {
pname = "libxcb-errors";
Expand Down Expand Up @@ -108,9 +113,9 @@
];

configurePhase = ''
echo 'Copying GitHub gdwlroots to ./modules/gdwlroots'
cp -r ${gdwlroots} modules/gdwlroots
chmod -R u+w modules/gdwlroots
echo 'Copying GitHub gdwlroots to ./modules/gdwlroots'
cp -r ${gdwlroots} modules/gdwlroots
chmod -R u+w modules/gdwlroots

echo 'Generating xdg-shell-protocol.{h,c}'
cd modules/gdwlroots
Expand Down Expand Up @@ -159,6 +164,11 @@
config.allowUnfree = true;
};

treefmt = {
projectRootFile = ".editorconfig";
programs.nixfmt.enable = true;
};

packages = {
inherit godot wlroots;
default = godot;
Expand Down
Loading