fix: nix build
This commit is contained in:
parent
e65e918a9e
commit
ddd5c270d1
4 changed files with 54 additions and 6 deletions
|
|
@ -34,7 +34,7 @@ set(CMAKE_CXX_EXTENSIONS OFF)
|
||||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
|
||||||
|
|
||||||
set(DISTRIBUTOR "Unset" CACHE STRING "Distributor")
|
set(DISTRIBUTOR "Unset" CACHE STRING "Distributor")
|
||||||
set(ENABLE_MODULES "extras;plugin;shell" CACHE STRING "Modules to build/install")
|
set(ENABLE_MODULES "extras;plugin;shell;m3shapes" CACHE STRING "Modules to build/install")
|
||||||
set(INSTALL_LIBDIR "usr/lib/caelestia" CACHE STRING "Library install dir")
|
set(INSTALL_LIBDIR "usr/lib/caelestia" CACHE STRING "Library install dir")
|
||||||
set(INSTALL_QMLDIR "usr/lib/qt6/qml" CACHE STRING "QML install dir")
|
set(INSTALL_QMLDIR "usr/lib/qt6/qml" CACHE STRING "QML install dir")
|
||||||
set(INSTALL_QSCONFDIR "etc/xdg/quickshell/caelestia" CACHE STRING "Quickshell config install dir")
|
set(INSTALL_QSCONFDIR "etc/xdg/quickshell/caelestia" CACHE STRING "Quickshell config install dir")
|
||||||
|
|
@ -72,7 +72,7 @@ if("shell" IN_LIST ENABLE_MODULES)
|
||||||
install(FILES LICENSE DESTINATION "${INSTALL_QSCONFDIR}")
|
install(FILES LICENSE DESTINATION "${INSTALL_QSCONFDIR}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if("plugin" IN_LIST ENABLE_MODULES OR "shell" IN_LIST ENABLE_MODULES)
|
if("m3shapes" IN_LIST ENABLE_MODULES)
|
||||||
message(STATUS "Fetching M3Shapes module")
|
message(STATUS "Fetching M3Shapes module")
|
||||||
include(FetchContent)
|
include(FetchContent)
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
|
|
|
||||||
17
flake.lock
generated
17
flake.lock
generated
|
|
@ -21,6 +21,22 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"m3shapes": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1777812556,
|
||||||
|
"narHash": "sha256-E5nqOucRQBWKuT31AMekmfgMywRdHgSbU86R7t4BKKA=",
|
||||||
|
"owner": "soramanew",
|
||||||
|
"repo": "m3shapes",
|
||||||
|
"rev": "356825d31f16052a782735cce264331cba0cb71b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "soramanew",
|
||||||
|
"repo": "m3shapes",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1780243769,
|
"lastModified": 1780243769,
|
||||||
|
|
@ -60,6 +76,7 @@
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"caelestia-cli": "caelestia-cli",
|
"caelestia-cli": "caelestia-cli",
|
||||||
|
"m3shapes": "m3shapes",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"quickshell": "quickshell"
|
"quickshell": "quickshell"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,11 @@
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
inputs.caelestia-shell.follows = "";
|
inputs.caelestia-shell.follows = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
m3shapes = {
|
||||||
|
url = "github:soramanew/m3shapes";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
|
|
@ -30,6 +35,7 @@
|
||||||
|
|
||||||
packages = forAllSystems (pkgs: rec {
|
packages = forAllSystems (pkgs: rec {
|
||||||
caelestia-shell = pkgs.callPackage ./nix {
|
caelestia-shell = pkgs.callPackage ./nix {
|
||||||
|
inherit (inputs) m3shapes;
|
||||||
rev = self.rev or self.dirtyRev;
|
rev = self.rev or self.dirtyRev;
|
||||||
stdenv = pkgs.clangStdenv;
|
stdenv = pkgs.clangStdenv;
|
||||||
quickshell = inputs.quickshell.packages.${pkgs.stdenv.hostPlatform.system}.default.override {
|
quickshell = inputs.quickshell.packages.${pkgs.stdenv.hostPlatform.system}.default.override {
|
||||||
|
|
@ -48,7 +54,7 @@
|
||||||
shell = self.packages.${pkgs.stdenv.hostPlatform.system}.caelestia-shell;
|
shell = self.packages.${pkgs.stdenv.hostPlatform.system}.caelestia-shell;
|
||||||
in
|
in
|
||||||
pkgs.mkShell.override {stdenv = shell.stdenv;} {
|
pkgs.mkShell.override {stdenv = shell.stdenv;} {
|
||||||
inputsFrom = [shell shell.plugin shell.extras];
|
inputsFrom = [shell shell.plugin shell.extras shell.m3shapesModule];
|
||||||
packages = with pkgs; [clazy material-symbols rubik nerd-fonts.caskaydia-cove];
|
packages = with pkgs; [clazy material-symbols rubik nerd-fonts.caskaydia-cove];
|
||||||
CAELESTIA_XKB_RULES_PATH = "${pkgs.xkeyboard-config}/share/xkeyboard-config-2/rules/base.lst";
|
CAELESTIA_XKB_RULES_PATH = "${pkgs.xkeyboard-config}/share/xkeyboard-config-2/rules/base.lst";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@
|
||||||
ninja,
|
ninja,
|
||||||
pkg-config,
|
pkg-config,
|
||||||
caelestia-cli,
|
caelestia-cli,
|
||||||
|
m3shapes,
|
||||||
debug ? false,
|
debug ? false,
|
||||||
withCli ? false,
|
withCli ? false,
|
||||||
extraRuntimeDeps ? [],
|
extraRuntimeDeps ? [],
|
||||||
|
|
@ -67,6 +68,9 @@
|
||||||
(lib.cmakeFeature "DISTRIBUTOR" "nix-flake")
|
(lib.cmakeFeature "DISTRIBUTOR" "nix-flake")
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# The build sandbox has no network access so add it as a flake input instead
|
||||||
|
m3shapesFlag = lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_M3SHAPES_EXTERNAL" "${m3shapes}";
|
||||||
|
|
||||||
extras = stdenv.mkDerivation {
|
extras = stdenv.mkDerivation {
|
||||||
inherit cmakeBuildType;
|
inherit cmakeBuildType;
|
||||||
name = "caelestia-extras${lib.optionalString debug "-debug"}";
|
name = "caelestia-extras${lib.optionalString debug "-debug"}";
|
||||||
|
|
@ -94,7 +98,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [cmake ninja pkg-config];
|
nativeBuildInputs = [cmake ninja pkg-config];
|
||||||
buildInputs = [qt6.qtbase qt6.qtdeclarative libqalculate pipewire aubio libcava fftw];
|
buildInputs = [qt6.qtbase qt6.qtdeclarative qt6.qtshadertools libqalculate pipewire aubio libcava fftw lm_sensors];
|
||||||
|
|
||||||
dontWrapQtApps = true;
|
dontWrapQtApps = true;
|
||||||
cmakeFlags =
|
cmakeFlags =
|
||||||
|
|
@ -104,6 +108,27 @@
|
||||||
]
|
]
|
||||||
++ cmakeVersionFlags;
|
++ cmakeVersionFlags;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
m3shapesModule = stdenv.mkDerivation {
|
||||||
|
inherit cmakeBuildType;
|
||||||
|
name = "caelestia-m3shapes${lib.optionalString debug "-debug"}";
|
||||||
|
src = lib.fileset.toSource {
|
||||||
|
root = ./..;
|
||||||
|
fileset = ./../CMakeLists.txt;
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [cmake ninja];
|
||||||
|
buildInputs = [qt6.qtbase qt6.qtdeclarative];
|
||||||
|
|
||||||
|
dontWrapQtApps = true;
|
||||||
|
cmakeFlags =
|
||||||
|
[
|
||||||
|
(lib.cmakeFeature "ENABLE_MODULES" "m3shapes")
|
||||||
|
(lib.cmakeFeature "INSTALL_QMLDIR" qt6.qtbase.qtQmlPrefix)
|
||||||
|
m3shapesFlag
|
||||||
|
]
|
||||||
|
++ cmakeVersionFlags;
|
||||||
|
};
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
inherit version cmakeBuildType;
|
inherit version cmakeBuildType;
|
||||||
|
|
@ -111,7 +136,7 @@ in
|
||||||
src = ./..;
|
src = ./..;
|
||||||
|
|
||||||
nativeBuildInputs = [cmake ninja makeWrapper qt6.wrapQtAppsHook];
|
nativeBuildInputs = [cmake ninja makeWrapper qt6.wrapQtAppsHook];
|
||||||
buildInputs = [quickshell extras plugin xkeyboard-config qt6.qtbase];
|
buildInputs = [quickshell extras plugin m3shapesModule xkeyboard-config qt6.qtbase];
|
||||||
propagatedBuildInputs = runtimeDeps;
|
propagatedBuildInputs = runtimeDeps;
|
||||||
|
|
||||||
cmakeFlags =
|
cmakeFlags =
|
||||||
|
|
@ -144,7 +169,7 @@ in
|
||||||
'';
|
'';
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
inherit plugin extras;
|
inherit plugin extras m3shapesModule;
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue