English 中文(简体)
建设 Env 内建功能如何运作?
原标题:How buildEnv builtin function works?
  • 时间:2018-03-31 17:32:34
  •  标签:
  • nix
  • nixpkgs
How does buildEnv work? Why is it built in? How can I use it? What does the manifest argument do? Where is the documentation about buildEnv?
最佳回答
Are looking the actual buildenv.nix or the buildEnv function? Because buildenv.nix is an internal mechanism of the Nix package manager not of much interest for non developer of Nix itself. If you re interested in the buildEnv function is part of NixPkgs package collection, this function is implemented here: https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/buildenv/default.nix Even if the code give some hints, I didn t found any real documentation, but you can find some examples in the manual: https://nixos.org/nixpkgs/manual/#sec-building-environment If I understand correctly, the manifest is also internal to Nix: It is a Nix file that contains a list of derivation that correspond to a given environment. You can have a look at one on a machine with nix in /nix/var/nix/profiles/per-user/root/channels/manifest.nix for example. It is not very readable, it looks like this: [ { meta = { }; name = "nixos-18.09pre143771.a8c71037e04"; out = { outPath = "/nix/store/yqxc408mhbcksnaqndkpdkg8ylcj2xhg-nixos-18.09pre143771.a8c71037e04"; }; outPath = "/nix/store/yqxc408mhbcksnaqndkpdkg8ylcj2xhg-nixos-18.09pre143771.a8c71037e04"; outputs = [ "out" ]; system = "x86_64-linux"; type = "derivation"; } { meta = { }; name = "nixos-1803-18.03.132768.94d80eb7247"; out = { outPath = "/nix/store/ih8bhvgmp47rs3acchkc9ch7f8760rpz-nixos-1803-18.03.132768.94d80eb7247"; }; outPath = "/nix/store/ih8bhvgmp47rs3acchkc9ch7f8760rpz-nixos-1803-18.03.132768.94d80eb7247"; outputs = [ "out" ]; system = "x86_64-linux"; type = "derivation"; } ]
问题回答

暂无回答




相关问题
4. 套电应用

电子仪器历来难以在Nix进行包装(见这一冷却表),但显然情况并非如此。

`nix run .` works, but `nix run github:myorg/myrepo` doesn t

I have a flake.nix with an apps.default among its outputs. If I am in the project directory, the app runs when I run: nix run . But when I try to run it from a different machine: nix run github:...

建设 Env 内建功能如何运作?

建设 Env 是如何运作的? 为什么它建在其中? 我如何使用它? 明确的争论是什么? 建设 Env 的文件在哪里?

Simple python QT app with NixOs and pyqt6

Trying to figure out how to setup a super basic Dev Shell for working on a QT6+Python app. I cant seem to get anything able to run the most minimal example. It would expect the basic poetry template ...

Flutter can t find libsecret using nix/nixos

I am trying to run a Flutter application with flutter_secure_storage as a dependency on linux. This dependency in turn needs libsecret and won t compile despite the path being present in ...

How can I test the syntax of a single nix file?

How can I test the syntax of a single nix file? To check if it compiles correctly. Often I m working on a Nixos config and it would be useful to have a faster way to check for syntax errors as opposed ...

热门标签