3 ms·
Question 1: That is a reasonable way to build and install. I normally structure things like this (https://www.reddit.com/r/NixOS/comments/8tkllx/standard_projec
by tomberek 6y ago
Question 1: That is a reasonable way to build and install. I normally structure things like this (https://www.reddit.com/r/NixOS/comments/8tkllx/standard_project_structure/ https://www.reddit.com/r/NixOS/comments/8tkllx/standard_proj...) where the Nixpkgs-compatible derivation is in derivation.nix and the default.nix or overlay.nix contains the "callPackage" portion.
Question 2:
including such a derivation is easy with overlays or with the method above.
drv = import ./path-to-derivation.nix;
package = pkgs.callPackage drv {};
or something similar can work. Overlays would be slightly more re-usable, but would take a few more expressions. I'd do that if there are multiple packages you need to introduce; I normally use overlays to manage groups of interdependent packages, a "meta-package".
- thibran 6y agoThanks a lot for this :)