some more packaging stuff
This commit is contained in:
11
lib.nix
11
lib.nix
@@ -53,15 +53,17 @@ rec {
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
mizeMdules = let
|
|
||||||
from_mize_modules_repo = findModules mize_modules;
|
|
||||||
mize_module_path = builtins.getEnv "MIZE_MODULE_PATH";
|
mize_module_path = builtins.getEnv "MIZE_MODULE_PATH";
|
||||||
mize_module_no_repo = builtins.getEnv "MIZE_MODULE_NO_REPO";
|
|
||||||
dirs_from_path = pkgs.lib.lists.remove "" (pkgs.lib.strings.splitString ":" mize_module_path);
|
dirs_from_path = pkgs.lib.lists.remove "" (pkgs.lib.strings.splitString ":" mize_module_path);
|
||||||
dirs_in_nix_store = map (path: builtins.fetchGit {
|
dirs_in_nix_store = map (path: builtins.fetchGit {
|
||||||
url = path;
|
url = path;
|
||||||
}) dirs_from_path;
|
}) dirs_from_path;
|
||||||
from_env_var = map findModules dirs_in_nix_store;
|
from_env_var = map findModules dirs_in_nix_store;
|
||||||
|
mizeMdules = let
|
||||||
|
from_mize_modules_repo = findModules mize_modules;
|
||||||
|
mize_module_no_repo = builtins.getEnv "MIZE_MODULE_NO_REPO";
|
||||||
in pkgs.lib.lists.flatten (from_env_var ++ (if mize_module_no_repo != "" then [] else from_mize_modules_repo));
|
in pkgs.lib.lists.flatten (from_env_var ++ (if mize_module_no_repo != "" then [] else from_mize_modules_repo));
|
||||||
|
|
||||||
|
|
||||||
@@ -232,6 +234,7 @@ rec {
|
|||||||
main-default = craneLib.buildPackage ({
|
main-default = craneLib.buildPackage ({
|
||||||
src = "${self}";
|
src = "${self}";
|
||||||
cargoExtraArgs = "--bin mize --features os-target";
|
cargoExtraArgs = "--bin mize --features os-target";
|
||||||
|
# CARGO_PROFILE = "dev"; does not work...
|
||||||
strictDeps = true;
|
strictDeps = true;
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
@@ -397,6 +400,8 @@ rec {
|
|||||||
in rec {
|
in rec {
|
||||||
inherit toolchain_version_drv pkgsCross craneLib;
|
inherit toolchain_version_drv pkgsCross craneLib;
|
||||||
|
|
||||||
|
inherit mize_module_path dirs_from_path dirs_in_nix_store from_env_var;
|
||||||
|
|
||||||
devShell = mainDevShell;
|
devShell = mainDevShell;
|
||||||
|
|
||||||
main =
|
main =
|
||||||
|
|||||||
Reference in New Issue
Block a user