OverridePackages local nixpkgs config to add new packages

I am looking for enlightenment on how to do the best way in my situation like this:

  • I have a nixpkgs folder in my project that I download from another repo. It is located on mine theproject/front-plat/default.nix

    , then the code looks like this.

    { nixpkgsFunc ? import ./nixpkgs }: let nixpkgs = nixpkgsFunc ({ config = { ... }; lib = {...}; etc.

  • In mine, theproject/release.nix

    I want to add new packages to be used for my build using front-plat nixpkgs. So the code looks like this.

    { front-plat ? import ./deps/front-plat {}}: let nixpkgs = front-platform.nixpkgs; packageCompiler = front-plat.compiler; config = rec { ... packageOverrides = pkgs: rec { packageCompiler = pkgs.packageCompiler.override { overrides = self: super: rec { fronFrint = self.callPackage (import ./frontFrint { inherit front-plat; }); }; }; };

3 What I am assuming, now I am using nixpkgs from front-plat, but I am still not sure if my nixpkgs packageCompiler already contains the fronFrint package or not.

The question is how to add new packages called frontFrint to the nixpkgs packageCompiler. so that packageCompiler can build fronFrint. for example at the end the code will be  in { front = pkgs.packageCompiler.frontFrint; }

+3


source to share





All Articles