Page MenuHomeFreeBSD

[new port] [WIP] sysutils/nix: Purely functional package manager
Changes PlannedPublic

Authored by 0mp on Oct 30 2018, 9:11 PM.

Details

Reviewers
mat
Summary

Nix manual: https://nixos.org/nix/manual/


Repository with the latest patch: https://github.com/0mp/freebsd-ports-nix

Test Plan

Apply the patch.

Run the following commands:

host# poudriere testport -j 120a -o sysutils/nix -I
host# jexec 120a-default-n env -i TERM=$TERM /usr/bin/login -fp root
jail# make -C /usr/ports/sysutils/nix test

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 24936
Build 23661: arc lint + arc unit

Event Timeline

0mp created this revision.Oct 30 2018, 9:11 PM
0mp added a comment.Oct 30 2018, 9:13 PM

At the moment it fails in the configure phase as it cannot find libcrypto.

Interestingly, if we add autoreconf to USES then it cannot find OPENSSL. It probably has something to do with the bootstrap.sh script mentioned in the manual here: https://nixos.org/nix/manual/#sec-building-source

0mp updated this revision to Diff 49837.Oct 31 2018, 5:34 PM
0mp added a subscriber: ndowens_yahoo.com.

Fix further configure errors.

Thanks to @ndowens_yahoo.com for showing me how to start patching configure.ac.

0mp planned changes to this revision.Nov 16 2018, 1:42 PM
0mp updated this revision to Diff 52383.Dec 28 2018, 11:29 PM

Work a little bit more on the nix port.

0mp planned changes to this revision.Dec 28 2018, 11:31 PM
0mp added inline comments.
sysutils/nix/files/patch-Makefile
8 ↗(On Diff #52383)

this should be reverted in the future

linimon retitled this revision from [WIP] sysutils/nix: Purely functional package manager to [new port] [WIP] sysutils/nix: Purely functional package manager.Jan 15 2019, 8:25 PM
0mp updated this revision to Diff 57178.EditedMay 8 2019, 12:11 PM
  • Update to 2.2.2
  • Build fails with:
 LD     src/libutil/libnixutil.so
/usr/bin/ld: error: /usr/lib:1: unknown directive:
>>> /D2libregex_p.a2libmenuw_p.a2libprivatessh.so.52libsmb.so2libssl.so2pam_tacplus.so.62crtbeginT.o2libprivateldns_p.a2libdevinfo_p.a2libkiconv.a
>>> ^
c++: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[1]: *** [mk/lib.mk:104: src/libutil/libnixutil.so] Error 1
0mp planned changes to this revision.May 8 2019, 12:13 PM

Help with debugging would be appreciated.

0mp updated this revision to Diff 58760.Jun 18 2019, 9:13 AM

Nix 2.2.2 now compiles.

There are some tests still failing...

0mp updated this revision to Diff 58787.Jun 19 2019, 9:58 AM
  • Add more nixbld users
  • Fix some typos
0mp updated this revision to Diff 58788.Jun 19 2019, 9:59 AM
  • Update GIDs
0mp updated this revision to Diff 58794.Jun 19 2019, 2:13 PM
  • Fix configure issues with AX_CXX_COMPILE_STDCXX_14
mat added inline comments.Jun 20 2019, 10:43 AM
UIDs
319–328

Does this *really* need 10 different UIDs ?
UIDs are scarce, and with a very limited number, they should probably not be abused like that.

0mp edited the summary of this revision. (Show Details)Jun 21 2019, 8:24 AM
0mp edited the test plan for this revision. (Show Details)
0mp added inline comments.Jun 21 2019, 8:27 AM
UIDs
319–328

This part of the manual says that you need X nixbld users if you want to build X packages concurrently. I'd say that we might want to just provide a script wrapper for creating users or add a note to pkg-message. The number of users depends heavily on user's use case...

BTW I've added some references to the description of this differential revision.

0mp added a subscriber: yuri.Jun 21 2019, 3:06 PM
mat added inline comments.Jun 22 2019, 8:18 AM
UIDs
319–328

I think this should be left to the operator to create, as the number of packages you can build at the same time depends on your CPU, and can range from 1 to a hundred.

Maybe provide a script to create the users and add a note to it in pkg-message.

0mp added a comment.Nov 24 2019, 6:16 PM

I've created a repository to coordinate work over this patch: https://github.com/0mp/freebsd-ports-nix

0mp edited the summary of this revision. (Show Details)Nov 24 2019, 6:17 PM
dch added a subscriber: dch.Nov 25 2019, 7:30 PM
0mp planned changes to this revision.Feb 1 2020, 11:58 AM
yuri added a comment.Feb 1 2020, 2:47 PM

Why is a package manager needed, if we already have a package manager (pkg)?

0mp added a comment.Feb 1 2020, 4:13 PM
In D17766#514584, @yuri wrote:

Why is a package manager needed, if we already have a package manager (pkg)?

A lot of people would like to see Nix running on FreeBSD, it seems to be a nice piece of technology and managing packages is only a small subset of its features.

yuri added a comment.Feb 1 2020, 4:16 PM

managing packages is only a small subset of its features

The port description is incomplete then. -)

0mp added a comment.Feb 4 2020, 11:50 AM
In D17766#514608, @yuri wrote:

managing packages is only a small subset of its features

The port description is incomplete then. -)

Hmm, sure. I could probably be improved a little bit.

This is not the latest patch BTW. See the description on the top of this website for a link to the repo.

mat requested changes to this revision.Feb 4 2020, 12:21 PM

As this surfaces, record my request for changes.

Please do not use static users and groups, provide a script to create the number of users/groups the user will need.

0mp added a comment.Feb 6 2020, 5:17 PM
In D17766#515698, @mat wrote:

As this surfaces, record my request for changes.
Please do not use static users and groups, provide a script to create the number of users/groups the user will need.

I've done it already in the version of the port I keep on GitHub at the moment. Thanks for the reminder :)