mirror of
https://codeberg.org/icewind/mill-scale.git
synced 2026-06-03 09:54:19 +02:00
This commit is contained in:
parent
6055ccecb6
commit
d8e263916a
3 changed files with 16 additions and 8 deletions
|
|
@ -18,6 +18,7 @@ let
|
|||
(merged: dep: {
|
||||
build = merged.build ++ (availableAutoDeps.${dep}.build or [ ]);
|
||||
native = merged.native ++ (availableAutoDeps.${dep}.native or [ ]);
|
||||
runtime = merged.runtime ++ (availableAutoDeps.${dep}.runtime or [ ]);
|
||||
env =
|
||||
if (hasAttr "env" availableAutoDeps.${dep}) then
|
||||
pkgs: (merged.env pkgs) // (availableAutoDeps.${dep}.env pkgs)
|
||||
|
|
@ -26,11 +27,13 @@ let
|
|||
{
|
||||
build = [ ];
|
||||
native = [ ];
|
||||
runtime = [ ];
|
||||
env = pkgs: { };
|
||||
}
|
||||
detectedDeps else {
|
||||
build = [ ];
|
||||
native = [ ];
|
||||
runtime = [ ];
|
||||
env = pkgs: { };
|
||||
};
|
||||
getPkgs = pkgs: deps:
|
||||
|
|
@ -41,6 +44,7 @@ let
|
|||
autoDeps = pkgs: {
|
||||
buildInputs = getPkgs pkgs mergedDetectedDeps.build;
|
||||
nativeBuildInputs = with pkgs; [ pkg-config ] ++ (getPkgs pkgs mergedDetectedDeps.native);
|
||||
runtimeInputs = getPkgs pkgs mergedDetectedDeps.runtime;
|
||||
env = mergedDetectedDeps.env pkgs;
|
||||
};
|
||||
in
|
||||
|
|
|
|||
|
|
@ -5,11 +5,7 @@
|
|||
"expat-sys" = { native = [ "cmake" ]; };
|
||||
"servo-fontconfig-sys" = { build = [ "fontconfig" ]; };
|
||||
"x11-dl" = { build = [ "xorg.libX11" "xorg.libXcursor" "xorg.libXrandr" "xorg.libXi" ]; };
|
||||
"glutin_glx_sys" = {
|
||||
build = [ "libGL" ];
|
||||
env = pkgs: {
|
||||
LD_LIBRARY_PATH = with pkgs; "/run/opengl-driver/lib/:${lib.makeLibraryPath ([libGL libGLU])}";
|
||||
};
|
||||
};
|
||||
"glutin_glx_sys" = { runtime = [ "libGL" "libGLU" ]; };
|
||||
"wayland-egl" = { build = [ "egl-wayland" ]; };
|
||||
"wayland-sys" = { runtime = [ "wayland" "libxkbcommon" ]; };
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,10 +20,13 @@ let
|
|||
hasDefaultPackage = pathExists (src + /nix/package.nix);
|
||||
|
||||
autoDeps = (import ./autodeps { inherit lib src config; });
|
||||
buildDeps = pkgs: {
|
||||
buildDeps = pkgs: rec {
|
||||
buildInputs = (autoDeps pkgs).buildInputs ++ (config.buildInputs pkgs);
|
||||
nativeBuildInputs = (autoDeps pkgs).nativeBuildInputs ++ (config.nativeBuildInputs pkgs);
|
||||
env = (autoDeps pkgs).env // (config.buildEnv pkgs);
|
||||
runtimeInputs = (autoDeps pkgs).runtimeInputs ++ (config.runtimeInputs pkgs);
|
||||
env = (autoDeps pkgs).env // (config.buildEnv pkgs) // {
|
||||
LD_LIBRARY_PATH = "/run/opengl-driver/lib/:${lib.makeLibraryPath (runtimeInputs)}";
|
||||
};
|
||||
};
|
||||
in
|
||||
warnIf (! builtins ? readFileType) "Unsupported Nix version in use."
|
||||
|
|
@ -70,6 +73,11 @@ warnIf (! builtins ? readFileType) "Unsupported Nix version in use."
|
|||
default = pkgs: { };
|
||||
description = "build environent variables for the package";
|
||||
};
|
||||
runtimeInputs = mkOption {
|
||||
type = function;
|
||||
default = pkgs: [ ];
|
||||
description = "runtime inputs for the package";
|
||||
};
|
||||
tools = mkOption {
|
||||
type = function;
|
||||
default = pkgs: with pkgs; [ cargo-edit bacon ];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue