Documentation for mkDerivation
After a year of using NixOS, `stdenv.mkDerivation` is still something of a mystery to me. I only know how to use it by copying examples from other packages. Is there documentation somewhere - most importantly, a list of _all_ of the arguments that `mkDerivation` accepts, and what each of them does? (And if it does already exist, how can we make it more discoverable?) I can see some of them in [`pkgs/stdenv/generic/default.nix`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/default.nix#L92-L109): ``` # Add a utility function to produce derivations that use this # stdenv and its shell. mkDerivation = { buildInputs ? [] , nativeBuildInputs ? [] , propagatedBuildInputs ? [] , propagatedNativeBuildInputs ? [] , crossConfig ? null , meta ? {} , passthru ? {} , pos ? null # position used in error messages and for meta.position , separateDebugInfo ? false , outputs ? [ "out" ] , __impureHostDeps ? [] , __propagatedImpureHostDeps ? [] , sandboxProfile ? "" , propagatedSandboxProfile ? "" , ... } @ attrs: ``` But clearly that arg list isn't complete - for example, it doesn't contain `src`, or any of the build phases.
Posted by chris-martin on Sep 16, 2016, 10:16 PM
Tags
Related issues
- [Meta] Feedback on granular control over Copilot changes
- unexpected status 401 Unauthorized issue
- [MODEL] Measurable quality regression in Claude generation 5 (Fable 5 / Opus 5 / Sonnet 5): worse nonsense detection, ~2x verbosity, under-disclosed model fallb
- [CRITICAL] Subagent spawning and subagent pattern bugs trigger infinite recursion, infinite token usage, grossly inefficient token usage, and lost accumulated s
- Video stops playing after some minutes
- [MODEL] Claude verbose code comments by default — ignores instructions to stop.
Raise real-world problems, find people facing the same issue, and discuss solutions.4,500 issues0 comments
github (Software)
[Meta] Feedback on granular control over Copilot changes
unexpected status 401 Unauthorized issue
[MODEL] Measurable quality regression in Claude generation 5 (Fable 5 / Opus 5 / Sonnet 5): worse nonsense detection, ~2x verbosity, under-disclosed model fallb
[CRITICAL] Subagent spawning and subagent pattern bugs trigger infinite recursion, infinite token usage, grossly inefficient token usage, and lost accumulated s
Video stops playing after some minutes
[MODEL] Claude verbose code comments by default — ignores instructions to stop.
Scope Codex VS Code chats to the current workspace/project
Update on "Co-authored-by: Copilot" in commit messages
Documentation for mkDerivation
After a year of using NixOS, `stdenv.mkDerivation` is still something of a mystery to me. I only know how to use it by copying examples from other packages. Is there documentation somewhere - most importantly, a list of _all_ of the arguments that `mkDerivation` accepts, and what each of them does? (And if it does already exist, how can we make it more discoverable?) I can see some of them in [`pkgs/stdenv/generic/default.nix`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/default.nix#L92-L109): ``` # Add a utility function to produce derivations that use this # stdenv and its shell. mkDerivation = { buildInputs ? [] , nativeBuildInputs ? [] , propagatedBuildInputs ? [] , propagatedNativeBuildInputs ? [] , crossConfig ? null , meta ? {} , passthru ? {} , pos ? null # position used in error messages and for meta.position , separateDebugInfo ? false , outputs ? [ "out" ] , __impureHostDeps ? [] , __propagatedImpureHostDeps ? [] , sandboxProfile ? "" , propagatedSandboxProfile ? "" , ... } @ attrs: ``` But clearly that arg list isn't complete - for example, it doesn't contain `src`, or any of the build phases.
Comments (0)
No comments yet. Start the discussion.