chore(mach-nix-xs): update drv-parts for better syntax

This commit is contained in:
DavHau 2023-02-19 15:33:48 +07:00
parent 75377f1c7b
commit 1b445e7719
2 changed files with 7 additions and 14 deletions

View File

@ -161,14 +161,15 @@ in {
mach-nix.lib = {inherit extractPythonAttrs;};
mach-nix.drvs = l.flip l.mapAttrs all-dists-compat-patchelf (name: dist:
# A fake module to import other modules
(_: {
imports = [
# generate a module from a package func
(drv-parts.lib.makeModule (_: dist))
drv-parts.lib.makeModule {
packageFunc = dist;
# TODO: if `overridePythonAttrs` is used here, the .dist output is missing
# Maybe a bug in drv-parts?
overrideFuncName = "overrideAttrs";
modules = [
{deps = {inherit (config.deps) stdenv;};}
];
})
}
);
deps = {nixpkgs, ...}: l.mapAttrs (_: l.mkDefault) (

View File

@ -40,14 +40,6 @@ in {
};
};
# overrides = l.mkOption {
# type = t.lazyAttrsOf (t.functionTo t.attrs);
# description = ''
# Overrides for sdist package builds
# '';
# default = {};
# };
drvs = l.mkOption {
type = t.attrsOf (t.submoduleWith {
modules = [drv-parts.modules.drv-parts.package];