34 lines
855 B
Nix
34 lines
855 B
Nix
{ flake-parts-lib, inputs, self, ... }:
|
|
|
|
let
|
|
inherit (flake-parts-lib) importApply;
|
|
in
|
|
{
|
|
imports = [ (importApply ./modules/npm-srcs { inherit inputs self; }) ];
|
|
npm-srcs = {
|
|
root = ./.;
|
|
remotes = {
|
|
npm = [
|
|
{ name = "ergogen"; }
|
|
];
|
|
};
|
|
};
|
|
|
|
perSystem = { pkgs, ... }:
|
|
{
|
|
npm-srcs.patch = super: super // {
|
|
ergogen = super.ergogen.override ({ src, ... }: {
|
|
src = pkgs.runCommand "patched-ergogen-src.tgz" { }
|
|
''
|
|
tar zxvf ${src}
|
|
|
|
# ergogen used the wrong name for package kle-serial... patch the tarball
|
|
sed -i 's/"kle-serial":/"@ijprest\/kle-serial":/g' package/package.json
|
|
patch -u package/src/kle.js -i ${./npm_lock/ergogen-kle.patch}
|
|
|
|
tar zcvf $out package
|
|
'';
|
|
});
|
|
};
|
|
};
|
|
}
|