Cross-compiling to Redox using Nix

栏目: IT技术 · 发布时间: 5年前

内容简介:Nixpkgs recently mergedAs expected, few of Nixpkgs’s 60,000 packages cross-compile to Redox without failing. I’ve created

Cross-compiling to Redox using Nix

Introduction

Nixpkgs recently merged PR #93568 , allowing the Nix package manager to cross-compile packages to Redox.

As expected, few of Nixpkgs’s 60,000 packages cross-compile to Redox without failing. I’ve created redoxpkgs , a wrapper around Nixpkgs to fix broken packages, with the hope that some patches will eventually be adapted upstream.

Nix has several properties that make cross-compiling to Redox pleasant. First, Nix reproducibly compiles packages, meaning that if a build works on my system, it should work on yours, too. Second, Nix allows porting packages en mass. A single change to a toolchain package could make a large number of packages suddenly compatible with Redox. Or, if needed, a patch could be automatically applied to the build process of every package of a given language being cross-compiled to Redox.

To get started, after installing Nix, simply checkout the Redox overlay (linked above) then run nix-build , specifying which package you want to cross-compile:

$ git clone https://github.com/aaronjanse/redoxpkgs
$ cd redoxpkgs
$ nix-build . -A hexyl

At the time of writing, few packages have been ported, but I hope to change that over time.

I plan to eventually setup a small Nix package cache for Redox. In the meantime, expect your first build to take a long time as Nix builds the Redox toolchain from source.

Going Forward

The future of Nix and Redox depends mostly on reception by the respective communities and how well the two systems work together long-term. It would be cool to port Nix to run on Redox itself so that packages can be built and installed on Redox rather than cross-compiled then copied from a Linux machine.

In theory, if enough packages are ported, the Redox ISOs themselves could be declaratively compiled using Nix. In the meantime, though, I plan to focus my efforts elsewhere, dogfooding my Nix toolchain as I continue to contribute to Redox.


以上所述就是小编给大家介绍的《Cross-compiling to Redox using Nix》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

法律论证理论

法律论证理论

罗伯特·阿列克西 / 舒国滢 / 中国法制出版社 / 2002-12-01 / 30.00

阿列克西的著作探讨的主要问题是如法律裁决之类的规范性陈述如何以理性的方式证立。阿列克西将规范性陈述的证立过程看作实践商谈或“实践言说”,而将法律裁决的证立过程视为“法律言说” 。由于支持法律规范的法律商谈是普遍实践言说的特定形式,所以法律论证理论应当立基于这种一般理论。 在阿列克西看来,如果裁决是理性言说的结果,那么这一规范性陈述就是真实的或可接受的。其基本观念在于法律裁决证立的合理性取决于......一起来看看 《法律论证理论》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

URL 编码/解码
URL 编码/解码

URL 编码/解码

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换