nixos/templates/rust/nix/lib.nix

29 lines
405 B
Nix
Raw Normal View History

{
flip,
pipe,
splitString,
head,
listToAttrs,
nameValuePair,
getAttrFromPath,
...
}: {
2025-07-13 06:04:55 +08:00
genFunctionArgs = flip pipe [
(map (
flip pipe [
(splitString ".")
head
(flip nameValuePair false)
]
))
listToAttrs
];
genInputsWith = pkgs:
2025-07-13 06:04:55 +08:00
map (
flip pipe [
(splitString ".")
(flip getAttrFromPath pkgs)
]
);
}