nix: fix not building

This commit is contained in:
EdenQwQ 2025-06-25 00:03:25 +08:00
parent e8fe574632
commit accd34ba29
4 changed files with 51 additions and 133 deletions

126
flake.lock generated
View file

@ -1,20 +1,5 @@
{ {
"nodes": { "nodes": {
"flake-compat": {
"locked": {
"lastModified": 1746162366,
"narHash": "sha256-5SSSZ/oQkwfcAz/o/6TlejlVGqeK08wyREBQ5qFFPhM=",
"owner": "nix-community",
"repo": "flake-compat",
"rev": "0f158086a2ecdbb138cd0429410e44994f1b7e4b",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": { "flake-parts": {
"inputs": { "inputs": {
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
@ -51,43 +36,6 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"lib-aggregate": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs-lib": "nixpkgs-lib_3"
},
"locked": {
"lastModified": 1749989692,
"narHash": "sha256-ojISk2CXljR3qIgwgZh4iNzP3W2H3zGH49xWTJARkoM=",
"owner": "nix-community",
"repo": "lib-aggregate",
"rev": "cae85629e70ce05b968757f3af8f2f2b3923d080",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "lib-aggregate",
"type": "github"
}
},
"mmsg": { "mmsg": {
"inputs": { "inputs": {
"flake-parts": "flake-parts_2", "flake-parts": "flake-parts_2",
@ -155,77 +103,31 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-lib_3": {
"locked": {
"lastModified": 1749950217,
"narHash": "sha256-qXoEFKOnznVvMAKezJhSXzRKsJ/LHLRY8NCw1mGhwrU=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "753176a8605439613fc6dc9911267b9f720a2615",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixpkgs-wayland": {
"inputs": {
"flake-compat": "flake-compat",
"lib-aggregate": "lib-aggregate",
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1750512508,
"narHash": "sha256-gqSQsdLwfEXG076aSG/SLxKwmFzPdi6cfpl6OZhfnfo=",
"owner": "nix-community",
"repo": "nixpkgs-wayland",
"rev": "c020c609f5bbf34ad5b39856caabafae6175b739",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs-wayland",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1750365781,
"narHash": "sha256-XE/lFNhz5lsriMm/yjXkvSZz5DfvKJLUjsS6pP8EC50=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "08f22084e6085d19bcfb4be30d1ca76ecb96fe54",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"mmsg": "mmsg", "mmsg": "mmsg",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nixpkgs-wayland": "nixpkgs-wayland" "scenefx": "scenefx"
} }
}, },
"systems": { "scenefx": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1750744509,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "narHash": "sha256-XD5EcquaHBg5spsN06fPHAjVCb1vOMM7oxmjZZ/PxIE=",
"owner": "nix-systems", "owner": "wlrfx",
"repo": "default", "repo": "scenefx",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", "rev": "0f069970b410195aa5908d98c6fb41f3f0cd6e76",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-systems", "owner": "wlrfx",
"repo": "default", "repo": "scenefx",
"type": "github" "type": "github"
} }
} }

View file

@ -1,12 +1,15 @@
{ {
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland";
flake-parts.url = "github:hercules-ci/flake-parts"; flake-parts.url = "github:hercules-ci/flake-parts";
mmsg = { mmsg = {
url = "github:DreamMaoMao/mmsg"; url = "github:DreamMaoMao/mmsg";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
scenefx = {
url = "github:wlrfx/scenefx";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = { outputs = {
@ -34,8 +37,8 @@
callPackage callPackage
; ;
maomaowm = callPackage ./nix { maomaowm = callPackage ./nix {
inherit (inputs.nixpkgs-wayland.packages.${pkgs.system}) wlroots;
inherit (inputs.mmsg.packages.${pkgs.system}) mmsg; inherit (inputs.mmsg.packages.${pkgs.system}) mmsg;
inherit (inputs.scenefx.packages.${pkgs.system}) scenefx;
}; };
shellOverride = old: { shellOverride = old: {
nativeBuildInputs = old.nativeBuildInputs ++ []; nativeBuildInputs = old.nativeBuildInputs ++ [];
@ -52,6 +55,9 @@
devShells.default = maomaowm.overrideAttrs shellOverride; devShells.default = maomaowm.overrideAttrs shellOverride;
formatter = pkgs.alejandra; formatter = pkgs.alejandra;
}; };
systems = ["x86_64-linux" "aarch64-linux"]; systems = [
"x86_64-linux"
"aarch64-linux"
];
}; };
} }

View file

@ -17,19 +17,35 @@
enableXWayland ? true, enableXWayland ? true,
meson, meson,
ninja, ninja,
wlroots,
mmsg, mmsg,
libgbm,
scenefx,
wlroots_0_19,
libGL,
}: let }: let
pname = "maomaowm"; pname = "maomaowm";
# Use patched wlroots from github.com/DreamMaoMao/wlroots # Use patched wlroots from github.com/DreamMaoMao/wlroots
wlroots-git = wlroots.overrideAttrs (final: prev: { wlroots-git = wlroots_0_19.overrideAttrs (
src = fetchFromGitHub { final: prev: {
owner = "DreamMaoMao"; src = fetchFromGitHub {
repo = "wlroots"; owner = "DreamMaoMao";
rev = "afbb5b7c2b14152730b57aa11119b1b16a299d5b"; repo = "wlroots";
sha256 = "sha256-pVU+CuiqvduMTpsnDHX/+EWY2qxHX2lXKiVzdGtcnYY="; rev = "afbb5b7c2b14152730b57aa11119b1b16a299d5b";
}; sha256 = "sha256-pVU+CuiqvduMTpsnDHX/+EWY2qxHX2lXKiVzdGtcnYY=";
}); };
}
);
scenefx-0-4 = scenefx.overrideAttrs (
final: prev: {
buildInputs =
prev.buildInputs
++ [
libgbm
libxcb
xcbutilwm
];
}
);
in in
stdenv.mkDerivation { stdenv.mkDerivation {
inherit pname; inherit pname;
@ -57,6 +73,8 @@ in
wayland wayland
wayland-protocols wayland-protocols
wlroots-git wlroots-git
scenefx-0-4
libGL
] ]
++ lib.optionals enableXWayland [ ++ lib.optionals enableXWayland [
libX11 libX11

View file

@ -190,14 +190,6 @@ int border_radius_location_default = CORNER_LOCATION_ALL;
int blur = 0; int blur = 0;
int blur_layer = 0; int blur_layer = 0;
struct blur_data {
int num_passes;
int radius;
float noise;
float brightness;
float contrast;
float saturation;
};
struct blur_data blur_params; struct blur_data blur_params;
int blur_params_num_passes = 1; int blur_params_num_passes = 1;
@ -213,4 +205,4 @@ double shadows_blur = 15;
int shadows_position_x = 0; int shadows_position_x = 0;
int shadows_position_y = 0; int shadows_position_y = 0;
float shadowscolor[] = COLOR(0x000000ff); float shadowscolor[] = COLOR(0x000000ff);
; ;