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