mirror of
https://codeberg.org/icewind/mill-scale.git
synced 2026-06-03 18:04:09 +02:00
autotools for sqlx
This commit is contained in:
parent
591ea924cf
commit
2343c0f007
2 changed files with 11 additions and 2 deletions
4
autotools.nix
Normal file
4
autotools.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"sqlx" = ["sqlx-cli"];
|
||||||
|
"insta" = ["cargo-insta"];
|
||||||
|
}
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
inputs,
|
inputs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (builtins) elem readFile pathExists match any;
|
inherit (builtins) elem readFile pathExists match any concatLists;
|
||||||
inherit (lib) getExe map mkDefault mkIf mkMerge mkOption warnIf optionalAttrs types optionalString genAttrs hasInfix optionals;
|
inherit (lib) getExe map mkDefault mkIf mkMerge mkOption warnIf optionalAttrs types optionalString genAttrs hasInfix optionals;
|
||||||
inherit (lib.fileset) fileFilter toSource unions;
|
inherit (lib.fileset) fileFilter toSource unions;
|
||||||
inherit (flakelight.types) fileset function optFunctionTo;
|
inherit (flakelight.types) fileset function optFunctionTo;
|
||||||
|
|
@ -39,7 +39,12 @@
|
||||||
LD_LIBRARY_PATH = "/run/opengl-driver/lib/:${lib.makeLibraryPath runtimeInputs}";
|
LD_LIBRARY_PATH = "/run/opengl-driver/lib/:${lib.makeLibraryPath runtimeInputs}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
autoTools = pkgs: optionals (elem "insta" cargoMeta.dev-dependencies) [pkgs.cargo-insta];
|
autoTools = let
|
||||||
|
definitions = import ./autotools.nix;
|
||||||
|
perDependency = map (dep: definitions.${dep} or []) (cargoMeta.dependencies ++ cargoMeta.dev-dependencies);
|
||||||
|
all = concatLists perDependency;
|
||||||
|
in
|
||||||
|
pkgs: map (pkgName: pkgs.${pkgName}) all;
|
||||||
in
|
in
|
||||||
warnIf (! builtins ? readFileType) "Unsupported Nix version in use."
|
warnIf (! builtins ? readFileType) "Unsupported Nix version in use."
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue