Page MenuHomeFreeBSD

[New port] sysutils/nix: Purely functional package manager
ClosedPublic

Authored by 0mp on Oct 30 2018, 9:11 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Mar 20, 10:17 AM
Unknown Object (File)
Mon, Mar 18, 5:57 PM
Unknown Object (File)
Sun, Mar 10, 12:07 AM
Unknown Object (File)
Thu, Mar 7, 3:50 AM
Unknown Object (File)
Feb 25 2024, 7:15 AM
Unknown Object (File)
Feb 9 2024, 9:37 AM
Unknown Object (File)
Feb 7 2024, 4:09 PM
Unknown Object (File)
Feb 7 2024, 1:41 PM

Details

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 Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 33726
Build 30958: arc lint + arc unit

Event Timeline

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 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

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
  • 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.

Nix 2.2.2 now compiles.

There are some tests still failing...

  • Add more nixbld users
  • Fix some typos
  • Fix configure issues with AX_CXX_COMPILE_STDCXX_14
UIDs
319–328 ↗(On Diff #58794)

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 test plan for this revision. (Show Details)
UIDs
319–328 ↗(On Diff #58794)

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.

UIDs
319–328 ↗(On Diff #58794)

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.

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

0mp planned changes to this revision.Feb 1 2020, 11:58 AM

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

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.

managing packages is only a small subset of its features

The port description is incomplete then. -)

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.

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 :)

UIDs
319–328 ↗(On Diff #58794)

Can we add 1 user first and then later add more if this would be needed?

UIDs
319–328 ↗(On Diff #58794)

The latest patch on GitHub (https://github.com/0mp/freebsd-ports-nix) just creates a group and then offers a script to create a desired number of users.

UIDs
319–328 ↗(On Diff #58794)

Is this version usable? If yes, can you commit it?

0mp retitled this revision from [new port] [WIP] sysutils/nix: Purely functional package manager to [New port] sysutils/nix: Purely functional package manager.Sep 22 2020, 11:59 AM

Add nix to sysutils/Makefile

I think its time to commit this port, so I'd like to ask you for a review. Thanks!

sysutils/nix/Makefile
22–24

This port is here three times, please only use one.

List devel/aws-sdk-cpp only once in LIB_DEPENDS

0mp marked an inline comment as done.Sep 23 2020, 8:45 PM
This revision was not accepted when it landed; it landed in state Needs Review.Sep 25 2020, 12:54 PM
This revision was automatically updated to reflect the committed changes.