fix: flake building (#383)

This commit is contained in:
John Axel Eriksson 2025-02-23 08:05:22 +01:00 committed by GitHub
parent 50d4cf45ab
commit ba743d298d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 26 additions and 27 deletions

32
flake.lock generated
View file

@ -2,27 +2,11 @@
"nodes": { "nodes": {
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1727089097, "lastModified": 1739698114,
"narHash": "sha256-ZMHMThPsthhUREwDebXw7GX45bJnBCVbfnH1g5iuSPc=", "narHash": "sha256-8S9n69Dnpg8DhfFlP0YvMGmSOY2X4kImGSPWXYNpaHM=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "568bfef547c14ca438c56a0bece08b8bb2b71a9c", "rev": "b1b43d32be000928cc71250ed77f4a0a5f2bc23a",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1713128889,
"narHash": "sha256-aB90ZqzosyRDpBh+rILIcyP5lao8SKz8Sr2PSWvZrzk=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "2748d22b45a99fb2deafa5f11c7531c212b2cefa",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -40,14 +24,16 @@
}, },
"scenefx": { "scenefx": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_2" "nixpkgs": [
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1726812372, "lastModified": 1739733667,
"narHash": "sha256-JyEaeuwgPr041MaNz7EgvxPmYcx/Z46xEvalw5eu8Q4=", "narHash": "sha256-BLIADMQwPJUtl6hFBhh5/xyYwLFDnNQz0RtgWO/Ua8s=",
"owner": "wlrfx", "owner": "wlrfx",
"repo": "scenefx", "repo": "scenefx",
"rev": "be3eea191cb9aecea1ddf4f1399bcbb390027998", "rev": "87c0e8b6d5c86557a800445e8e4c322f387fe19c",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -2,7 +2,10 @@
description = "Swayfx development environment"; description = "Swayfx development environment";
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
scenefx.url = "github:wlrfx/scenefx"; scenefx = {
url = "github:wlrfx/scenefx";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = outputs =
{ {
@ -14,13 +17,23 @@
let let
mkPackage = pkgs: { mkPackage = pkgs: {
swayfx-unwrapped = swayfx-unwrapped =
pkgs.swayfx-unwrapped.overrideAttrs (pkgs.swayfx-unwrapped.override {
wlroots_0_17 = pkgs.wlroots_0_18;
}).overrideAttrs
(old: { (old: {
version = "0.4.0-git"; version = "0.4.0-git";
src = pkgs.lib.cleanSource ./.; src = pkgs.lib.cleanSource ./.;
nativeBuildInputs = old.nativeBuildInputs ++ [ pkgs.cmake ]; nativeBuildInputs = old.nativeBuildInputs ++ [ pkgs.cmake ];
buildInputs = old.buildInputs ++ [ pkgs.scenefx ]; buildInputs = old.buildInputs ++ [ pkgs.scenefx ];
providedSessions = [ pkgs.swayfx-unwrapped.meta.mainProgram ]; providedSessions = [ pkgs.swayfx-unwrapped.meta.mainProgram ];
patches = []; ## this should probably be fixed properly
mesonFlags = let
inherit (pkgs.lib.strings) mesonEnable mesonOption;
in
[
(mesonOption "sd-bus-provider" "libsystemd")
(mesonEnable "tray" true)
];
}); });
}; };
@ -55,7 +68,7 @@
name = "swayfx-shell"; name = "swayfx-shell";
inputsFrom = [ inputsFrom = [
self.packages.${pkgs.system}.swayfx-unwrapped self.packages.${pkgs.system}.swayfx-unwrapped
pkgs.wlroots_0_17 pkgs.wlroots_0_18
pkgs.scenefx pkgs.scenefx
]; ];
packages = with pkgs; [ packages = with pkgs; [
@ -65,7 +78,7 @@
( (
# Copy the nix version of wlroots and scenefx into the project # Copy the nix version of wlroots and scenefx into the project
mkdir -p "$PWD/subprojects" && cd "$PWD/subprojects" mkdir -p "$PWD/subprojects" && cd "$PWD/subprojects"
cp -R --no-preserve=mode,ownership ${pkgs.wlroots_0_17.src} wlroots cp -R --no-preserve=mode,ownership ${pkgs.wlroots_0_18.src} wlroots
cp -R --no-preserve=mode,ownership ${pkgs.scenefx.src} scenefx cp -R --no-preserve=mode,ownership ${pkgs.scenefx.src} scenefx
)''; )'';
}; };