Compare commits

...
Sign in to create a new pull request.

34 commits

Author SHA1 Message Date
Jens Petersen
c6ba971f4a rebuild for https://fedoraproject.org/wiki/Changes/F44_Boost_1_90 2026-01-14 22:58:18 +08:00
Jens Petersen
5fe7386873 ghost /nix/var/nix/* and sockets
- add builds/ ghost back to daemon (since it creates it)
- db/ and gcroots/auto/ remain after uninstalling
2025-11-28 15:26:01 +08:00
Jens Petersen
98df99f77c readme: for singleuser setup check id output 2025-11-28 12:29:05 +08:00
Jens Petersen
eef01d8c8e devel description: note that API is unstable 2025-11-28 12:28:25 +08:00
Jens Petersen
3de48dcfc0 readme: mention channel setup 2025-11-28 11:56:23 +08:00
Jens Petersen
6aed6c629d reformat description 2025-11-28 11:56:23 +08:00
Jens Petersen
1115ba9601 trivial spec changes 2025-11-28 11:56:23 +08:00
Jens Petersen
80d23ca87a nix-daemon requires systemd 2025-11-28 11:56:23 +08:00
Jens Petersen
0d43c98794 base package now requires nix-system: drop owning /nix/var/nix/*
This allows nix-system to work for both nix-daemon and single-user setups
(following discussion in #nix-dev)
2025-11-28 11:56:23 +08:00
Jens Petersen
64346930c9 only stick bit for /nix/store; move /nix/var/nix/builds to nix-system 2025-11-28 11:55:36 +08:00
Jens Petersen
dfa17d8c50 nix-daemon: requires nix-core instead of base package 2025-11-28 11:08:59 +08:00
Jens Petersen
80a7a7982b move /nix/var dirs to nix-filesystem
where they are actually created
2025-11-28 11:08:47 +08:00
Jens Petersen
901563692b remove unicode RLO chars from rl-2.26.md
https://github.com/NixOS/nix/issues/14666

rpminspect says:
BAD A forbidden code point, 0x202E, was found in the nix-2.31.2/doc/manual/source/release-notes/rl-2.26.md source file on line 115 at column 2. This source file is used by nix.spec. [Security]
2025-11-28 11:06:04 +08:00
Jens Petersen
8565b643b0 trivial: drop %name usage
Seems redundant
2025-11-25 19:23:13 +08:00
Jens Petersen
b039f0f78e nix-system: drop the explicit nix requires
In principle one could install nix-system and then use a custom nix binary.

The Requires was a leftover from the old multiuser toplevel subpackage
2025-11-25 19:16:40 +08:00
Jens Petersen
dc975f57c6 filter out rellinks from manpages (#2415126)
thanks Dennis Schridde for reporting

sed expression generation assisted by Gemini Pro
2025-11-19 16:49:12 +08:00
Jens Petersen
d14e25bc8b simplify nix-disable-mdbook.patch: disable 2 more manual cmds 2025-11-13 22:40:02 +08:00
Jens Petersen
4ff55bf8c7 enable manpages by patch to disable mdbook manual 2025-11-13 16:52:04 +08:00
Jens Petersen
bc56050014 add core and legacy commands subpackages 2025-11-04 18:55:33 +08:00
Jens Petersen
eedfe652da Convert to %autorelease and %autochangelog
[skip changelog]
2025-11-03 01:30:13 +08:00
Jens Petersen
3745d1e7f1 readme: rewrite home hack as rootless nix mode 2025-11-02 21:28:22 +08:00
Jens Petersen
1c9e64f566 fix example/flake with flake-utils 2025-11-02 21:10:29 +08:00
Jens Petersen
f96e840bbc few more readme tweaks 2025-11-01 21:17:22 +08:00
Jens Petersen
5423b1c641 use shell completions_dir macros 2025-10-28 01:21:57 +08:00
Jens Petersen
bbfaad7e40 fixup --sysconfdir option 2025-10-28 01:21:10 +08:00
Jens Petersen
053e4c2a5a readme tweaks 2025-10-28 00:54:32 +08:00
Jens Petersen
ce51ef4d32 CI: use 2 examples too 2025-10-28 00:54:32 +08:00
Jens Petersen
6cc7edd9cc readme: point to the reference manual instead of nix.dev 2025-10-27 18:32:15 +08:00
Jens Petersen
ad48933708 initial CI test 2025-10-27 17:39:39 +08:00
Jens Petersen
27d409411e add obsoletes for petersen/nix copr subpackages 2025-10-27 16:33:26 +08:00
Jens Petersen
1798595a37 drop redundant sysusers and tmpfiles.d scriptlets (#2388768) 2025-10-27 16:33:26 +08:00
Jens Petersen
2a21c00b8b add some example *.nix files 2025-10-27 16:33:21 +08:00
Jens Petersen
6bb3c3eaad recommends nix-daemon if systemd
include some example *.nix files
2025-10-27 13:03:56 +08:00
Jens Petersen
7fd1a6ce3f Import rhbz#2388768 2025-10-27 12:42:00 +08:00
23 changed files with 1258 additions and 2 deletions

1
.fmf/version Normal file
View file

@ -0,0 +1 @@
1

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/nix-2.31.2.tar.gz

218
13995.patch Normal file
View file

@ -0,0 +1,218 @@
From dd1a554aba720c5f23a529ddc32f1c7127b62af9 Mon Sep 17 00:00:00 2001
From: Jens Petersen <petersen@redhat.com>
Date: Mon, 15 Sep 2025 14:38:08 +0800
Subject: [PATCH] meson: add soversion with nix version to give SONAME to libs
(#13960, #13979)
remove 'pre' version suffix for non-releases (chokes Darwin ld)
---
src/libcmd/meson.build | 1 +
src/libexpr-c/meson.build | 1 +
src/libexpr-test-support/meson.build | 1 +
src/libexpr/meson.build | 1 +
src/libfetchers-c/meson.build | 1 +
src/libfetchers/meson.build | 1 +
src/libflake-c/meson.build | 1 +
src/libflake/meson.build | 1 +
src/libmain-c/meson.build | 1 +
src/libmain/meson.build | 1 +
src/libstore-c/meson.build | 1 +
src/libstore-test-support/meson.build | 1 +
src/libstore/meson.build | 1 +
src/libutil-c/meson.build | 1 +
src/libutil-test-support/meson.build | 1 +
src/libutil/meson.build | 1 +
16 files changed, 16 insertions(+)
diff --git a/src/libcmd/meson.build b/src/libcmd/meson.build
index 24e0752462c..b259182c266 100644
--- a/src/libcmd/meson.build
+++ b/src/libcmd/meson.build
@@ -95,6 +95,7 @@ this_library = library(
'nixcmd',
sources,
config_priv_h,
+ soversion : meson.project_version().replace('pre', ''),
dependencies : deps_public + deps_private + deps_other,
include_directories : include_dirs,
link_args : linker_export_flags,
diff --git a/src/libexpr-c/meson.build b/src/libexpr-c/meson.build
index 7c014d61d37..95c2c8ac92c 100644
--- a/src/libexpr-c/meson.build
+++ b/src/libexpr-c/meson.build
@@ -50,6 +50,7 @@ subdir('nix-meson-build-support/windows-version')
this_library = library(
'nixexprc',
sources,
+ soversion : meson.project_version().replace('pre', ''),
dependencies : deps_public + deps_private + deps_other,
include_directories : include_dirs,
link_args : linker_export_flags,
diff --git a/src/libexpr-test-support/meson.build b/src/libexpr-test-support/meson.build
index d762eb85e32..1d874320a51 100644
--- a/src/libexpr-test-support/meson.build
+++ b/src/libexpr-test-support/meson.build
@@ -44,6 +44,7 @@ subdir('nix-meson-build-support/windows-version')
this_library = library(
'nix-expr-test-support',
sources,
+ soversion : meson.project_version().replace('pre', ''),
dependencies : deps_public + deps_private + deps_other,
include_directories : include_dirs,
# TODO: Remove `-lrapidcheck` when https://github.com/emil-e/rapidcheck/pull/326
diff --git a/src/libexpr/meson.build b/src/libexpr/meson.build
index 40d3f390b4b..dc43a97420d 100644
--- a/src/libexpr/meson.build
+++ b/src/libexpr/meson.build
@@ -181,6 +181,7 @@ this_library = library(
parser_tab,
lexer_tab,
generated_headers,
+ soversion : meson.project_version().replace('pre', ''),
dependencies : deps_public + deps_private + deps_other,
include_directories : include_dirs,
link_args : linker_export_flags,
diff --git a/src/libfetchers-c/meson.build b/src/libfetchers-c/meson.build
index 8542744b4da..a381c792af9 100644
--- a/src/libfetchers-c/meson.build
+++ b/src/libfetchers-c/meson.build
@@ -53,6 +53,7 @@ subdir('nix-meson-build-support/windows-version')
this_library = library(
'nixfetchersc',
sources,
+ soversion : meson.project_version().replace('pre', ''),
dependencies : deps_public + deps_private + deps_other,
include_directories : include_dirs,
link_args : linker_export_flags,
diff --git a/src/libfetchers/meson.build b/src/libfetchers/meson.build
index 922a2c49199..e5f5bd19210 100644
--- a/src/libfetchers/meson.build
+++ b/src/libfetchers/meson.build
@@ -61,6 +61,7 @@ subdir('nix-meson-build-support/windows-version')
this_library = library(
'nixfetchers',
sources,
+ soversion : meson.project_version().replace('pre', ''),
dependencies : deps_public + deps_private + deps_other,
include_directories : include_dirs,
link_args : linker_export_flags,
diff --git a/src/libflake-c/meson.build b/src/libflake-c/meson.build
index 933e06d9037..83729178693 100644
--- a/src/libflake-c/meson.build
+++ b/src/libflake-c/meson.build
@@ -53,6 +53,7 @@ subdir('nix-meson-build-support/windows-version')
this_library = library(
'nixflakec',
sources,
+ soversion : meson.project_version().replace('pre', ''),
dependencies : deps_public + deps_private + deps_other,
include_directories : include_dirs,
link_args : linker_export_flags,
diff --git a/src/libflake/meson.build b/src/libflake/meson.build
index 191d8f0680c..a962258e723 100644
--- a/src/libflake/meson.build
+++ b/src/libflake/meson.build
@@ -58,6 +58,7 @@ this_library = library(
'nixflake',
sources,
generated_headers,
+ soversion : meson.project_version().replace('pre', ''),
dependencies : deps_public + deps_private + deps_other,
include_directories : include_dirs,
link_args : linker_export_flags,
diff --git a/src/libmain-c/meson.build b/src/libmain-c/meson.build
index 9e26ad8adf3..61ec4d54b53 100644
--- a/src/libmain-c/meson.build
+++ b/src/libmain-c/meson.build
@@ -45,6 +45,7 @@ subdir('nix-meson-build-support/windows-version')
this_library = library(
'nixmainc',
sources,
+ soversion : meson.project_version().replace('pre', ''),
dependencies : deps_public + deps_private + deps_other,
include_directories : include_dirs,
link_args : linker_export_flags,
diff --git a/src/libmain/meson.build b/src/libmain/meson.build
index 4a90d2d83b6..d465dd6a40f 100644
--- a/src/libmain/meson.build
+++ b/src/libmain/meson.build
@@ -77,6 +77,7 @@ this_library = library(
'nixmain',
sources,
config_priv_h,
+ soversion : meson.project_version().replace('pre', ''),
dependencies : deps_public + deps_private + deps_other,
include_directories : include_dirs,
link_args : linker_export_flags,
diff --git a/src/libstore-c/meson.build b/src/libstore-c/meson.build
index f8eaef80395..b73822b0cb7 100644
--- a/src/libstore-c/meson.build
+++ b/src/libstore-c/meson.build
@@ -46,6 +46,7 @@ subdir('nix-meson-build-support/windows-version')
this_library = library(
'nixstorec',
sources,
+ soversion : meson.project_version().replace('pre', ''),
dependencies : deps_public + deps_private + deps_other,
include_directories : include_dirs,
link_args : linker_export_flags,
diff --git a/src/libstore-test-support/meson.build b/src/libstore-test-support/meson.build
index b2977941f86..90fef8489ad 100644
--- a/src/libstore-test-support/meson.build
+++ b/src/libstore-test-support/meson.build
@@ -44,6 +44,7 @@ subdir('nix-meson-build-support/windows-version')
this_library = library(
'nix-store-test-support',
sources,
+ soversion : meson.project_version().replace('pre', ''),
dependencies : deps_public + deps_private + deps_other,
include_directories : include_dirs,
# TODO: Remove `-lrapidcheck` when https://github.com/emil-e/rapidcheck/pull/326
diff --git a/src/libstore/meson.build b/src/libstore/meson.build
index 7aeacbab79b..95dcf08bd0d 100644
--- a/src/libstore/meson.build
+++ b/src/libstore/meson.build
@@ -363,6 +363,7 @@ this_library = library(
generated_headers,
sources,
config_priv_h,
+ soversion : meson.project_version().replace('pre', ''),
dependencies : deps_public + deps_private + deps_other,
include_directories : include_dirs,
link_args : linker_export_flags,
diff --git a/src/libutil-c/meson.build b/src/libutil-c/meson.build
index 8131c517cd8..b214266a13a 100644
--- a/src/libutil-c/meson.build
+++ b/src/libutil-c/meson.build
@@ -53,6 +53,7 @@ this_library = library(
'nixutilc',
sources,
config_priv_h,
+ soversion : meson.project_version().replace('pre', ''),
dependencies : deps_public + deps_private + deps_other,
include_directories : include_dirs,
link_args : linker_export_flags,
diff --git a/src/libutil-test-support/meson.build b/src/libutil-test-support/meson.build
index 910f1d88164..da2b443ec54 100644
--- a/src/libutil-test-support/meson.build
+++ b/src/libutil-test-support/meson.build
@@ -41,6 +41,7 @@ subdir('nix-meson-build-support/windows-version')
this_library = library(
'nix-util-test-support',
sources,
+ soversion : meson.project_version().replace('pre', ''),
dependencies : deps_public + deps_private + deps_other,
include_directories : include_dirs,
# TODO: Remove `-lrapidcheck` when https://github.com/emil-e/rapidcheck/pull/326
diff --git a/src/libutil/meson.build b/src/libutil/meson.build
index cdffc892ae7..ff8b042c7ec 100644
--- a/src/libutil/meson.build
+++ b/src/libutil/meson.build
@@ -197,6 +197,7 @@ subdir('nix-meson-build-support/windows-version')
this_library = library(
'nixutil',
sources,
+ soversion : meson.project_version().replace('pre', ''),
dependencies : deps_public + deps_private + deps_other,
include_directories : include_dirs,
link_args : linker_export_flags,

246
14001.patch Normal file
View file

@ -0,0 +1,246 @@
From 86bb7c958a4ed46411da74a4498581a0cdc454a0 Mon Sep 17 00:00:00 2001
From: Jens Petersen <petersen@redhat.com>
Date: Tue, 16 Sep 2025 12:54:30 +0800
Subject: [PATCH] meson: refactor nix_soversion into
nix-meson-build-support/common
This is a follow-on to #13995 which added soversion to the libraries
---
nix-meson-build-support/common/meson.build | 3 +++
src/libcmd/meson.build | 2 +-
src/libexpr-c/meson.build | 2 +-
src/libexpr-test-support/meson.build | 2 +-
src/libexpr/meson.build | 2 +-
src/libfetchers-c/meson.build | 2 +-
src/libfetchers/meson.build | 2 +-
src/libflake-c/meson.build | 2 +-
src/libflake/meson.build | 2 +-
src/libmain-c/meson.build | 2 +-
src/libmain/meson.build | 2 +-
src/libstore-c/meson.build | 2 +-
src/libstore-test-support/meson.build | 2 +-
src/libstore/meson.build | 2 +-
src/libutil-c/meson.build | 2 +-
src/libutil-test-support/meson.build | 2 +-
src/libutil/meson.build | 2 +-
17 files changed, 19 insertions(+), 16 deletions(-)
diff --git a/nix-meson-build-support/common/meson.build b/nix-meson-build-support/common/meson.build
index fd686f1407f..5a29ff61d94 100644
--- a/nix-meson-build-support/common/meson.build
+++ b/nix-meson-build-support/common/meson.build
@@ -40,3 +40,6 @@ if cxx.get_id() == 'clang' and ('address' in get_option('b_sanitize') or 'undefi
))
add_project_link_arguments('-shared-libasan', language : 'cpp')
endif
+
+# Darwin ld doesn't like "X.Y.Zpre"
+nix_soversion = meson.project_version().strip('pre')
diff --git a/src/libcmd/meson.build b/src/libcmd/meson.build
index b259182c266..f553afa0ba1 100644
--- a/src/libcmd/meson.build
+++ b/src/libcmd/meson.build
@@ -95,7 +95,7 @@ this_library = library(
'nixcmd',
sources,
config_priv_h,
- soversion : meson.project_version().replace('pre', ''),
+ soversion : nix_soversion,
dependencies : deps_public + deps_private + deps_other,
include_directories : include_dirs,
link_args : linker_export_flags,
diff --git a/src/libexpr-c/meson.build b/src/libexpr-c/meson.build
index 95c2c8ac92c..c47704ce411 100644
--- a/src/libexpr-c/meson.build
+++ b/src/libexpr-c/meson.build
@@ -50,7 +50,7 @@ subdir('nix-meson-build-support/windows-version')
this_library = library(
'nixexprc',
sources,
- soversion : meson.project_version().replace('pre', ''),
+ soversion : nix_soversion,
dependencies : deps_public + deps_private + deps_other,
include_directories : include_dirs,
link_args : linker_export_flags,
diff --git a/src/libexpr-test-support/meson.build b/src/libexpr-test-support/meson.build
index 1d874320a51..df28661b7e7 100644
--- a/src/libexpr-test-support/meson.build
+++ b/src/libexpr-test-support/meson.build
@@ -44,7 +44,7 @@ subdir('nix-meson-build-support/windows-version')
this_library = library(
'nix-expr-test-support',
sources,
- soversion : meson.project_version().replace('pre', ''),
+ soversion : nix_soversion,
dependencies : deps_public + deps_private + deps_other,
include_directories : include_dirs,
# TODO: Remove `-lrapidcheck` when https://github.com/emil-e/rapidcheck/pull/326
diff --git a/src/libexpr/meson.build b/src/libexpr/meson.build
index dc43a97420d..55a36c1bd58 100644
--- a/src/libexpr/meson.build
+++ b/src/libexpr/meson.build
@@ -181,7 +181,7 @@ this_library = library(
parser_tab,
lexer_tab,
generated_headers,
- soversion : meson.project_version().replace('pre', ''),
+ soversion : nix_soversion,
dependencies : deps_public + deps_private + deps_other,
include_directories : include_dirs,
link_args : linker_export_flags,
diff --git a/src/libfetchers-c/meson.build b/src/libfetchers-c/meson.build
index a381c792af9..db415d9173e 100644
--- a/src/libfetchers-c/meson.build
+++ b/src/libfetchers-c/meson.build
@@ -53,7 +53,7 @@ subdir('nix-meson-build-support/windows-version')
this_library = library(
'nixfetchersc',
sources,
- soversion : meson.project_version().replace('pre', ''),
+ soversion : nix_soversion,
dependencies : deps_public + deps_private + deps_other,
include_directories : include_dirs,
link_args : linker_export_flags,
diff --git a/src/libfetchers/meson.build b/src/libfetchers/meson.build
index e5f5bd19210..792a0fdbf41 100644
--- a/src/libfetchers/meson.build
+++ b/src/libfetchers/meson.build
@@ -61,7 +61,7 @@ subdir('nix-meson-build-support/windows-version')
this_library = library(
'nixfetchers',
sources,
- soversion : meson.project_version().replace('pre', ''),
+ soversion : nix_soversion,
dependencies : deps_public + deps_private + deps_other,
include_directories : include_dirs,
link_args : linker_export_flags,
diff --git a/src/libflake-c/meson.build b/src/libflake-c/meson.build
index 83729178693..fddb39bdf96 100644
--- a/src/libflake-c/meson.build
+++ b/src/libflake-c/meson.build
@@ -53,7 +53,7 @@ subdir('nix-meson-build-support/windows-version')
this_library = library(
'nixflakec',
sources,
- soversion : meson.project_version().replace('pre', ''),
+ soversion : nix_soversion,
dependencies : deps_public + deps_private + deps_other,
include_directories : include_dirs,
link_args : linker_export_flags,
diff --git a/src/libflake/meson.build b/src/libflake/meson.build
index a962258e723..58916ecd9ab 100644
--- a/src/libflake/meson.build
+++ b/src/libflake/meson.build
@@ -58,7 +58,7 @@ this_library = library(
'nixflake',
sources,
generated_headers,
- soversion : meson.project_version().replace('pre', ''),
+ soversion : nix_soversion,
dependencies : deps_public + deps_private + deps_other,
include_directories : include_dirs,
link_args : linker_export_flags,
diff --git a/src/libmain-c/meson.build b/src/libmain-c/meson.build
index 61ec4d54b53..36332fdb70a 100644
--- a/src/libmain-c/meson.build
+++ b/src/libmain-c/meson.build
@@ -45,7 +45,7 @@ subdir('nix-meson-build-support/windows-version')
this_library = library(
'nixmainc',
sources,
- soversion : meson.project_version().replace('pre', ''),
+ soversion : nix_soversion,
dependencies : deps_public + deps_private + deps_other,
include_directories : include_dirs,
link_args : linker_export_flags,
diff --git a/src/libmain/meson.build b/src/libmain/meson.build
index d465dd6a40f..2ac59924e59 100644
--- a/src/libmain/meson.build
+++ b/src/libmain/meson.build
@@ -77,7 +77,7 @@ this_library = library(
'nixmain',
sources,
config_priv_h,
- soversion : meson.project_version().replace('pre', ''),
+ soversion : nix_soversion,
dependencies : deps_public + deps_private + deps_other,
include_directories : include_dirs,
link_args : linker_export_flags,
diff --git a/src/libstore-c/meson.build b/src/libstore-c/meson.build
index b73822b0cb7..c6b6174c775 100644
--- a/src/libstore-c/meson.build
+++ b/src/libstore-c/meson.build
@@ -46,7 +46,7 @@ subdir('nix-meson-build-support/windows-version')
this_library = library(
'nixstorec',
sources,
- soversion : meson.project_version().replace('pre', ''),
+ soversion : nix_soversion,
dependencies : deps_public + deps_private + deps_other,
include_directories : include_dirs,
link_args : linker_export_flags,
diff --git a/src/libstore-test-support/meson.build b/src/libstore-test-support/meson.build
index 90fef8489ad..5873680eae2 100644
--- a/src/libstore-test-support/meson.build
+++ b/src/libstore-test-support/meson.build
@@ -44,7 +44,7 @@ subdir('nix-meson-build-support/windows-version')
this_library = library(
'nix-store-test-support',
sources,
- soversion : meson.project_version().replace('pre', ''),
+ soversion : nix_soversion,
dependencies : deps_public + deps_private + deps_other,
include_directories : include_dirs,
# TODO: Remove `-lrapidcheck` when https://github.com/emil-e/rapidcheck/pull/326
diff --git a/src/libstore/meson.build b/src/libstore/meson.build
index 95dcf08bd0d..556616181ae 100644
--- a/src/libstore/meson.build
+++ b/src/libstore/meson.build
@@ -363,7 +363,7 @@ this_library = library(
generated_headers,
sources,
config_priv_h,
- soversion : meson.project_version().replace('pre', ''),
+ soversion : nix_soversion,
dependencies : deps_public + deps_private + deps_other,
include_directories : include_dirs,
link_args : linker_export_flags,
diff --git a/src/libutil-c/meson.build b/src/libutil-c/meson.build
index b214266a13a..1806dbb6f9a 100644
--- a/src/libutil-c/meson.build
+++ b/src/libutil-c/meson.build
@@ -53,7 +53,7 @@ this_library = library(
'nixutilc',
sources,
config_priv_h,
- soversion : meson.project_version().replace('pre', ''),
+ soversion : nix_soversion,
dependencies : deps_public + deps_private + deps_other,
include_directories : include_dirs,
link_args : linker_export_flags,
diff --git a/src/libutil-test-support/meson.build b/src/libutil-test-support/meson.build
index da2b443ec54..64231107eb6 100644
--- a/src/libutil-test-support/meson.build
+++ b/src/libutil-test-support/meson.build
@@ -41,7 +41,7 @@ subdir('nix-meson-build-support/windows-version')
this_library = library(
'nix-util-test-support',
sources,
- soversion : meson.project_version().replace('pre', ''),
+ soversion : nix_soversion,
dependencies : deps_public + deps_private + deps_other,
include_directories : include_dirs,
# TODO: Remove `-lrapidcheck` when https://github.com/emil-e/rapidcheck/pull/326
diff --git a/src/libutil/meson.build b/src/libutil/meson.build
index ff8b042c7ec..f4b8dbb613b 100644
--- a/src/libutil/meson.build
+++ b/src/libutil/meson.build
@@ -197,7 +197,7 @@ subdir('nix-meson-build-support/windows-version')
this_library = library(
'nixutil',
sources,
- soversion : meson.project_version().replace('pre', ''),
+ soversion : nix_soversion,
dependencies : deps_public + deps_private + deps_other,
include_directories : include_dirs,
link_args : linker_export_flags,

23
14005.patch Normal file
View file

@ -0,0 +1,23 @@
From ca23c819e0492272a695f3f87467a05c152ac77d Mon Sep 17 00:00:00 2001
From: Jens Petersen <petersen@redhat.com>
Date: Tue, 16 Sep 2025 18:31:40 +0800
Subject: [PATCH] nix-meson-build-support/common nix_soversion: fixup removal
of 'pre'
.strip() removes individual chars whereas .replace() affects whole substring
Thanks @keszybz
---
nix-meson-build-support/common/meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/nix-meson-build-support/common/meson.build b/nix-meson-build-support/common/meson.build
index 5a29ff61d94..a46715193c6 100644
--- a/nix-meson-build-support/common/meson.build
+++ b/nix-meson-build-support/common/meson.build
@@ -42,4 +42,4 @@ if cxx.get_id() == 'clang' and ('address' in get_option('b_sanitize') or 'undefi
endif
# Darwin ld doesn't like "X.Y.Zpre"
-nix_soversion = meson.project_version().strip('pre')
+nix_soversion = meson.project_version().replace('pre', '')

24
14018.patch Normal file
View file

@ -0,0 +1,24 @@
From 7dbfe9f5761662efdd7de8c00d940749af276240 Mon Sep 17 00:00:00 2001
From: Sergei Zimmerman <sergei@zimmerman.foo>
Date: Thu, 18 Sep 2025 23:34:27 +0300
Subject: [PATCH] meson: Fix SONAME for unstable versions
Replacing the string is not enough [^] for e.g. nixpkgs precise versions:
`2.31pre20250712_b1245123`
[^]: https://github.com/NixOS/nixpkgs/pull/444089
---
nix-meson-build-support/common/meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/nix-meson-build-support/common/meson.build b/nix-meson-build-support/common/meson.build
index a46715193c6..f08fb3d8439 100644
--- a/nix-meson-build-support/common/meson.build
+++ b/nix-meson-build-support/common/meson.build
@@ -42,4 +42,4 @@ if cxx.get_id() == 'clang' and ('address' in get_option('b_sanitize') or 'undefi
endif
# Darwin ld doesn't like "X.Y.Zpre"
-nix_soversion = meson.project_version().replace('pre', '')
+nix_soversion = meson.project_version().split('pre')[0]

61
14593.patch Normal file
View file

@ -0,0 +1,61 @@
From ef6dbe76dc25e67b47dc9a8caa6dd29ff5996a20 Mon Sep 17 00:00:00 2001
From: Jens Petersen <petersen@redhat.com>
Date: Wed, 19 Nov 2025 15:50:43 +0800
Subject: [PATCH] docs: fixup some rellinks to use ./ prefix for consistency
"./" prefix is already used almost everywhere
---
doc/manual/source/command-ref/nix-build.md | 6 +++---
doc/manual/source/command-ref/nix-instantiate.md | 2 +-
src/nix/profile-diff-closures.md | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/doc/manual/source/command-ref/nix-build.md b/doc/manual/source/command-ref/nix-build.md
index 3bb59cbed12..860a1fc9745 100644
--- a/doc/manual/source/command-ref/nix-build.md
+++ b/doc/manual/source/command-ref/nix-build.md
@@ -36,7 +36,7 @@ to a temporary location. The tarball must include a single top-level
directory containing at least a file named `default.nix`.
`nix-build` is essentially a wrapper around
-[`nix-instantiate`](nix-instantiate.md) (to translate a high-level Nix
+[`nix-instantiate`](./nix-instantiate.md) (to translate a high-level Nix
expression to a low-level [store derivation]) and [`nix-store
--realise`](@docroot@/command-ref/nix-store/realise.md) (to build the store
derivation).
@@ -52,8 +52,8 @@ derivation).
# Options
All options not listed here are passed to
-[`nix-store --realise`](nix-store/realise.md),
-except for `--arg` and `--attr` / `-A` which are passed to [`nix-instantiate`](nix-instantiate.md).
+[`nix-store --realise`](./nix-store/realise.md),
+except for `--arg` and `--attr` / `-A` which are passed to [`nix-instantiate`](./nix-instantiate.md).
- <span id="opt-no-out-link">[`--no-out-link`](#opt-no-out-link)<span>
diff --git a/doc/manual/source/command-ref/nix-instantiate.md b/doc/manual/source/command-ref/nix-instantiate.md
index 38454515d57..bac9f365933 100644
--- a/doc/manual/source/command-ref/nix-instantiate.md
+++ b/doc/manual/source/command-ref/nix-instantiate.md
@@ -32,7 +32,7 @@ standard input.
- `--add-root` *path*
- See the [corresponding option](nix-store.md) in `nix-store`.
+ See the [corresponding option](./nix-store.md) in `nix-store`.
- `--parse`
diff --git a/src/nix/profile-diff-closures.md b/src/nix/profile-diff-closures.md
index 295d1252bcd..1cfed160f31 100644
--- a/src/nix/profile-diff-closures.md
+++ b/src/nix/profile-diff-closures.md
@@ -23,6 +23,6 @@ R""(
This command shows the difference between the closures of subsequent
versions of a profile. See [`nix store
-diff-closures`](nix3-store-diff-closures.md) for details.
+diff-closures`](./nix3-store-diff-closures.md) for details.
)""

View file

@ -1,3 +1,56 @@
# nix
# How to setup nix on Fedora.
The nix package
Nix has two different modes of operation:
## Daemon mode for multi-user setup
This is recommended by upstream and more seamless.
The `nix-daemon` requires functioning systemd.
Just install the `nix` package, which pulls in `nix-daemon`,
by running:
```
$ sudo dnf install nix nix-daemon
$ sudo systemctl enable --now nix-daemon
```
## Single-user mode without nix-daemon
This mode also works in rootless containers and without systemd.
Run:
```
$ sudo dnf install nix --exclude nix-daemon
$ sudo usermod -aG nixbld $USER
```
and restart your login session:
make sure the `nixbld` group appears in `id` output.
This avoids the need to run nix-daemon.
## Rootless nix store under /home
Alternatively one can run rootless nix (which uses chroots) with just:
```
$ dnf install nix-core nix-legacy
```
The user nix store is: `~/.local/share/nix/root/nix/store`.
This also allows sharing one's nix store with toolboxes, etc.
However then nix profiles can only be used inside nix shells.
## Nixpkgs
You may want to setup a default nix channel.
```
$ nix-channel add https://nixos.org/channels/nixos-25.11 nixpkgs
```
for legacy commands, if you don't want to use rolling nixos-unstable.
# Testing
A simple way to check nix is working is to run e.g. `nix-shell -p hello`.
After a while of downloading, this should put you in
a nix shell subprocess where you should be able to run `hello`.
Run `nix --help` to learn more about the nix CLI
or read <https://nix.dev/>.

68
changelog Normal file
View file

@ -0,0 +1,68 @@
* Mon Oct 27 2025 Jens Petersen <petersen@redhat.com> - 2.31.2-8
- drop redundant sysusers and tmpfiles.d scriptlets (#2388768)
- add obsoletes for petersen/nix copr subpackages
* Sat Oct 25 2025 Jens Petersen <petersen@redhat.com> - 2.31.2-7
- recommends nix-daemon if systemd
* Sat Oct 25 2025 Jens Petersen <petersen@redhat.com> - 2.31.2-6
- rename users subpackage to system
- improve /nix/var dirs ownership and perms
- rename sysusers file to nix.conf
- move nix-daemon tmpfiles.d to nix-daemon
* Sat Oct 25 2025 Jens Petersen <petersen@redhat.com> - 2.31.2-5
- split nix-users from nix-daemon and drop nix-singleuser
- drop all conflicts
* Fri Oct 24 2025 Jens Petersen <petersen@redhat.com> - 2.31.2-4
- drop filesystem subpackage and ghost singleuser dirs
- nix-daemon and nix-singleuser conflict with each other
* Thu Oct 23 2025 Jens Petersen <petersen@redhat.com> - 2.31.2-3
- use tmpfiles.d for nix-filesystem
- improve the readme
- list bin files explicitly
- nix-singleuser now owns its dirs
- add nix-daemon conflicts for ostree and containers
- add nix-singleuser recommends for containers
* Sat Oct 18 2025 Jens Petersen <petersen@redhat.com> - 2.31.2-2
- FHS Exception for /nix was approved (https://pagure.io/fesco/issue/3473)
- add multiuser setup to daemon subpackage
- add singleuser and nix-filesystem subpackages
* Mon Sep 22 2025 Jens Petersen <petersen@redhat.com> - 2.31.2-1
- update to 2.31.2
* Wed Sep 17 2025 Jens Petersen <petersen@redhat.com> - 2.31.1-6
- list .so files explicitly without globbing (#2388768)
- disable /usr/lib/tmpfiles.d/nix-daemon.conf for now (#2388768)
* Mon Sep 15 2025 Jens Petersen <petersen@redhat.com> - 2.31.1-5
- set the soversion to the nix version (#13995, #14001, #14005)
* Sun Sep 14 2025 Jens Petersen <petersen@redhat.com> - 2.31.1-4
- add simple check with LD_LIBRARY_PATH
* Fri Sep 12 2025 Jens Petersen <petersen@redhat.com> - 2.31.1-3
- revert to shared libs, add libs subpackage and restore devel
- apply upstream submitted PR to enable soname versioning (#13966)
* Thu Sep 11 2025 Jens Petersen <petersen@redhat.com> - 2.31.1-2
- noarch nix-daemon subpackage cannot use _isa requires
* Wed Sep 10 2025 Jens Petersen <petersen@redhat.com> - 2.31.1-1
- https://github.com/NixOS/nix/blob/2.31.1/doc/manual/source/release-notes/rl-2.31.md
- rename nix-core to base package
- use readline (#2388768)
- improve MESON_OPTS setup (zbyszek, #2388768)
- use static libs and drop devel package
- disable perl binding
* Sat Aug 16 2025 Jens Petersen <petersen@redhat.com> - 2.30.2-2
- fix nix-devel requires
- add systemd scriptlets for nix-daemon
* Fri Aug 15 2025 Jens Petersen <petersen@redhat.com> - 2.30.2-1
- initial packaging of nix programs without /nix

View file

@ -0,0 +1,20 @@
{ pkgs ? import <nixpkgs> {} }:
# Use the writeTextFile function to create a simple script
pkgs.writeTextFile {
# Define the package's output name in the Nix store
name = "hello-script";
# The path and name of the resulting file in the final package
destination = "/bin/hello";
# The content of the file
text = ''
#!/bin/sh
echo "Hello from a reproducible Nix package!"
'';
# Make the script executable
executable = true;
}
# Run with: nix-build

13
examples/flake/flake.nix Normal file
View file

@ -0,0 +1,13 @@
{
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
in
{
devShells.default = pkgs.mkShell {
packages = with pkgs; [ hello ];
};
});
}
# Run with: nix develop

16
examples/shell/shell.nix Normal file
View file

@ -0,0 +1,16 @@
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
buildInputs = with pkgs; [
bash
# Other tools
#git
];
# Commands to run immediately when entering the shell (optional)
shellHook = ''
echo "Welcome to the bash shell!"
echo "Bash version: $(bash --version)"
'';
}
# Run with: nix-shell

46
nix-disable-mdbook.patch Normal file
View file

@ -0,0 +1,46 @@
--- nix-2.31.2/doc/manual/meson.build~ 2025-09-18 04:25:38.000000000 +0800
+++ nix-2.31.2/doc/manual/meson.build 2025-11-13 00:26:04.673032194 +0800
@@ -7,7 +7,7 @@
nix = find_program('nix', native : true)
-mdbook = find_program('mdbook', native : true)
+# mdbook = find_program('mdbook', native : true)
bash = find_program('bash', native : true)
rsync = find_program('rsync', required : true, native : true)
@@ -89,13 +89,12 @@
- @0@ @INPUT1@ summary @2@ < @CURRENT_SOURCE_DIR@/source/SUMMARY.md.in > @2@/source/SUMMARY.md
- sed -e 's|@version@|@3@|g' < @INPUT2@ > @2@/book.toml
@4@ -r --include='*.md' @CURRENT_SOURCE_DIR@/ @2@/
- (cd @2@; RUST_LOG=warn @1@ build -d @2@ 3>&2 2>&1 1>&3) | { grep -Fv "because fragment resolution isn't implemented" || :; } 3>&2 2>&1 1>&3
- rm -rf @2@/manual
- mv @2@/html @2@/manual
- find @2@/manual -iname meson.build -delete
+ # (cd @2@; RUST_LOG=warn @1@ build -d @2@ 3>&2 2>&1 1>&3) | { grep -Fv "because fragment resolution isn't implemented" || :; } 3>&2 2>&1 1>&3
+ #rm -rf @2@/manual
+ #mv @2@/html @2@/manual
+ #find @2@/manual -iname meson.build -delete
+ ln -s source @2@/markdown
'''.format(
python.full_path(),
- mdbook.full_path(),
+ 'no-mdbk',
meson.current_build_dir(),
meson.project_version(),
rsync.full_path(),
@@ -130,10 +130,10 @@
manual_html = manual[0]
manual_md = manual[1]
-install_subdir(
- manual_html.full_path(),
- install_dir : get_option('datadir') / 'doc/nix',
-)
+# install_subdir(
+# manual_html.full_path(),
+# install_dir : get_option('datadir') / 'doc/nix',
+# )
nix_nested_manpages = [
[

4
nix-filesystem.conf Normal file
View file

@ -0,0 +1,4 @@
q /nix 0755 root root - -
d /nix/var 0755 root root - -
d /nix/var/log 0755 root root - -
d /nix/var/log/nix 0755 root root - -

7
nix.conf Normal file
View file

@ -0,0 +1,7 @@
# this file is provided by the 'nix' package
auto-optimise-store = true
bash-prompt-prefix = (nix:$name)\040
experimental-features = nix-command flakes
extra-nix-path = nixpkgs=flake:nixpkgs
max-jobs = auto

403
nix.spec Normal file
View file

@ -0,0 +1,403 @@
%global nixbld_group nixbld
# needs mdbook: https://bugzilla.redhat.com/show_bug.cgi?id=2332609
%bcond docs 1
# test failures complain NIX_STORE undefined
# and missing rapidcheck
%bcond tests 0
Name: nix
# 2.32 needs boost >= 1.87 (https://bugzilla.redhat.com/show_bug.cgi?id=2406036)
# (https://github.com/NixOS/nix/pull/14340)
Version: 2.31.2
Release: %autorelease
Summary: A purely functional package manager
License: LGPL-2.1-or-later
URL: https://github.com/NixOS/nix
Source0: https://github.com/NixOS/nix/archive/%{version}/nix-%{version}.tar.gz
Source1: nix.conf
Source2: registry.json
Source3: README.md
Source4: nix.sysusers
Source5: nix-filesystem.conf
# soversion patches:
# https://github.com/NixOS/nix/pull/13995
Patch0: https://patch-diff.githubusercontent.com/raw/NixOS/nix/pull/13995.patch
# https://github.com/NixOS/nix/pull/14001
Patch1: https://patch-diff.githubusercontent.com/raw/NixOS/nix/pull/14001.patch
# https://github.com/NixOS/nix/pull/14005
Patch2: https://patch-diff.githubusercontent.com/raw/NixOS/nix/pull/14005.patch
# https://github.com/NixOS/nix/pull/14018
Patch3: https://patch-diff.githubusercontent.com/raw/NixOS/nix/pull/14018.patch
# disable mdbook
# https://github.com/NixOS/nix/issues/14548
Patch4: nix-disable-mdbook.patch
# https://github.com/NixOS/nix/pull/14593
Patch5: https://patch-diff.githubusercontent.com/raw/NixOS/nix/pull/14593.patch
# https://nixos.org/manual/nix/unstable/installation/prerequisites-source
# missing aws-cpp-sdk-s3 aws-c-auth aws-c-s3
#BuildRequires: aws-c-common
BuildRequires: bison
BuildRequires: blake3-devel
BuildRequires: bzip2-devel
BuildRequires: boost-devel
BuildRequires: boost-url
BuildRequires: brotli-devel
%ifarch x86_64 aarch64 ppc64le
BuildRequires: busybox
%endif
# needed for toml11
BuildRequires: cmake
%if %{with docs}
BuildRequires: doxygen
BuildRequires: rsync
%endif
BuildRequires: flex
BuildRequires: gc-devel
BuildRequires: gcc-c++
%if %{with tests}
BuildRequires: gmock-devel
%endif
BuildRequires: libgit2-devel
BuildRequires: jq
BuildRequires: json-devel
BuildRequires: libarchive-devel
%if %{defined fedora}
%ifarch x86_64
BuildRequires: libcpuid-devel
%endif
%endif
BuildRequires: libcurl-devel
BuildRequires: libseccomp-devel
BuildRequires: libsodium-devel
BuildRequires: lowdown
BuildRequires: lowdown-devel
BuildRequires: meson
BuildRequires: openssl-devel
%if %{with tests}
#BuildRequires: rapidcheck-devel
%endif
BuildRequires: readline-devel
BuildRequires: sqlite-devel
BuildRequires: systemd-rpm-macros
BuildRequires: toml11-devel
BuildRequires: xz-devel
Requires: nix-core = %{version}-%{release}
Requires: nix-system = %{version}-%{release}
Recommends: (nix-daemon = %{version}-%{release} if systemd)
Recommends: nix-legacy = %{version}-%{release}
%description
Nix is a purely functional package manager.
It allows multiple versions of a package to be installed side-by-side,
ensures that dependency specifications are complete,
supports atomic upgrades and rollbacks,
allows non-root users to install software, and has many other features.
It is the basis of the NixOS Linux distribution,
but it can be used equally well under other Unix systems.
See the README.fedora.md file for setup instructions.
%package core
Summary: Core nix tool
Requires: nix-libs%{?_isa} = %{version}-%{release}
%ifarch x86_64 aarch64 ppc64le
Recommends: busybox
%endif
%description core
This package provides the core nix tool for modern flake-based commands.
Most users should probably install nix-legacy as well,
or the main nix package for a complete default setup.
See the README.fedora.md file for setup instructions.
%package daemon
Summary: The nix daemon for multiuser mode
BuildArch: noarch
Requires: nix-core = %{version}-%{release}
Requires: nix-system = %{version}-%{release}
Requires: systemd
%description daemon
This package provides nix-daemon and associated files.
%package devel
Summary: Development files for nix
Requires: nix-libs%{?_isa} = %{version}-%{release}
%description devel
This package contains library and header files for
developing applications that use nix.
Note the API is considered unstable and upstream does not recommend its usage.
%if %{with docs}
%package doc
Summary: Documentation files for nix
BuildArch: noarch
%description doc
This package contains documentation files for nix.
%endif
%package filesystem
Summary: Filesystem for nix
BuildArch: noarch
# added at f43
Obsoletes: nix-singleuser < %{version}-%{release}
%description filesystem
The package provides the /nix root directory for the nix package manager.
%package legacy
Summary: nix classical commands
BuildArch: noarch
Requires: nix-core = %{version}-%{release}
%description legacy
This package provides the symlinks for the older nix-* commands.
%package libs
Summary: Runtime libraries for nix
%description libs
The package provides the the runtime libraries for nix.
%if %{with tests}
%package test
Summary: Nix test programs
Requires: nix%{?_isa} = %{version}-%{release}
%description test
This package provides the nix-test programs.
%endif
%package system
Summary: Nix directories and sysusers setup
BuildArch: noarch
Requires: nix-filesystem = %{version}-%{release}
%description system
This package sets up the nix directories and sysusers.
%prep
%autosetup -p1
install -p -m 0644 %{SOURCE3} README.fedora.md
# https://github.com/NixOS/nix/issues/14666
# remove unicode RLO (0x202E) characters
sed -i 's/\xe2\x80\xae//g' doc/manual/source/release-notes/rl-2.26.md
%build
MESON_OPTS=(
--sysconfdir=%{_sysconfdir}
--localstatedir=/nix/var
--libexecdir=%{_libexecdir}
-Dbindings=false
-Ddoc-gen=%[%{with docs}?"true":"false"]
-Dlibcmd:readline-flavor=readline
-Dlibstore:sandbox-shell=%{_bindir}/busybox
-Dnix:profile-dir=%{_sysconfdir}/profile.d
-Dunit-tests=%[%{with tests}?"true":"false"]
%ifarch x86_64
# missing from epel10: https://bugzilla.redhat.com/show_bug.cgi?id=2368495
%if %{undefined fedora}
-Dlibutil:cpuid=disabled
%endif
%else
-Dlibutil:cpuid=disabled
%endif
)
%meson "${MESON_OPTS[@]}"
%meson_build
%install
%meson_install
# nix config
mkdir -p %{buildroot}/etc/nix
cp %{SOURCE1} %{SOURCE2} %{buildroot}/etc/nix/
# Nix has multiuser and singleuser installation modes
# https://nix.dev/manual/nix/stable/installation/nix-security.html
mkdir -p %{buildroot}/nix/store
mkdir -p %{buildroot}/nix/var/log/nix/drvs
mkdir -p %{buildroot}/nix/var/nix
install -p -D -m 0644 %{SOURCE4} %{buildroot}%{_sysusersdir}/nix.conf
install -p -D -m 0644 %{SOURCE5} %{buildroot}%{_tmpfilesdir}/nix-filesystem.conf
# filter out relative doc links
# https://bugzilla.redhat.com/show_bug.cgi?id=2415126
# https://github.com/kristapsdz/lowdown/issues/170
# (sed expression generated by Gemini Pro: removes pairs of .UR and .UE lines)
sed -i -e '/^\.UR [@#.]/,/^\.UE/{ /^\.UR [@#.]/d; /^\.UE/d}' %{buildroot}%{_mandir}/man*/*
%check
LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}%{_bindir}/nix --help
%if %{with tests}
#export TEST_ROOT=/var/home/petersen/tmp/nix-test
%meson_test
%endif
%post daemon
%systemd_post nix-daemon.service
%preun daemon
%systemd_preun nix-daemon.service
%postun daemon
%systemd_postun_with_restart nix-daemon.service
%files
%files core
%doc README.md README.fedora.md
%{_bindir}/nix
%{_libexecdir}/nix
%config(noreplace) %{_sysconfdir}/nix/nix.conf
%config(noreplace) %{_sysconfdir}/nix/registry.json
%config(noreplace) %{_sysconfdir}/profile.d/nix.sh
%config(noreplace) %{_sysconfdir}/profile.d/nix.fish
%{bash_completions_dir}/nix
%{fish_completions_dir}/nix.fish
%{zsh_completions_dir}/_nix
%{zsh_completions_dir}/run-help-nix
%if %{with docs}
%{_mandir}/man1/nix.1*
%{_mandir}/man1/nix3-*.1*
%{_mandir}/man5/nix.conf.5*
%{_mandir}/man5/nix-profiles.5*
%endif
%files daemon
%{_bindir}/nix-daemon
%{_sysconfdir}/profile.d/nix-daemon.*sh
%{_unitdir}/nix-daemon.*
%{_tmpfilesdir}/nix-daemon.conf
%ghost %dir /nix/var/nix/builds
%ghost %dir /nix/var/nix/daemon-socket
%ghost /nix/var/nix/daemon-socket/socket
%if %{with docs}
%{_mandir}/man8/nix-daemon.8*
%endif
%files devel
%{_includedir}/nix
%{_includedir}/nix_api_*.h
%{_includedir}/nix_api_*.hh
%{_libdir}/libnixcmd.so
%{_libdir}/libnixexpr.so
%{_libdir}/libnixexprc.so
%{_libdir}/libnixfetchers.so
%{_libdir}/libnixfetchersc.so
%{_libdir}/libnixflake.so
%{_libdir}/libnixflakec.so
%{_libdir}/libnixmain.so
%{_libdir}/libnixmainc.so
%{_libdir}/libnixstore.so
%{_libdir}/libnixstorec.so
%{_libdir}/libnixutil.so
%{_libdir}/libnixutilc.so
%{_libdir}/pkgconfig/*.pc
%if %{with docs}
%files doc
%{_defaultdocdir}/nix
%endif
%files filesystem
# FHS Exception: https://pagure.io/fesco/issue/3473
%{_tmpfilesdir}/nix-filesystem.conf
%ghost %dir /nix
%ghost %dir /nix/var
%ghost %dir /nix/var/log
%ghost %dir /nix/var/log/nix
%files legacy
%{_bindir}/nix-build
%{_bindir}/nix-channel
%{_bindir}/nix-collect-garbage
%{_bindir}/nix-copy-closure
%{_bindir}/nix-env
%{_bindir}/nix-hash
%{_bindir}/nix-instantiate
%{_bindir}/nix-prefetch-url
%{_bindir}/nix-shell
%{_bindir}/nix-store
%if %{with docs}
%{_mandir}/man1/nix-*.1*
%endif
%files libs
%license COPYING
%{_libdir}/libnixcmd.so.%{version}
%{_libdir}/libnixexpr.so.%{version}
%{_libdir}/libnixexprc.so.%{version}
%{_libdir}/libnixfetchers.so.%{version}
%{_libdir}/libnixfetchersc.so.%{version}
%{_libdir}/libnixflake.so.%{version}
%{_libdir}/libnixflakec.so.%{version}
%{_libdir}/libnixmain.so.%{version}
%{_libdir}/libnixmainc.so.%{version}
%{_libdir}/libnixstore.so.%{version}
%{_libdir}/libnixstorec.so.%{version}
%{_libdir}/libnixutil.so.%{version}
%{_libdir}/libnixutilc.so.%{version}
%files system
%{_sysusersdir}/nix.conf
%dir %attr(1775,root,%{nixbld_group}) /nix/store
%dir %attr(775,root,%{nixbld_group}) /nix/var/log/nix/drvs
%dir %attr(775,root,%{nixbld_group}) /nix/var/nix
%ghost %dir /nix/var/nix/db
%ghost /nix/var/nix/gc.lock
%ghost %dir /nix/var/nix/gcroots
%ghost %dir /nix/var/nix/gcroots/per-user
%ghost %dir /nix/var/nix/gc-socket
%ghost /nix/var/nix/gc-socket/socket
%ghost %dir /nix/var/nix/profiles
%ghost %dir /nix/var/nix/profiles/per-user
%ghost %dir /nix/var/nix/temproots
%if %{with tests}
%files test
%{_bindir}/nix*-test
%endif
%changelog
%autochangelog

22
nix.sysusers Normal file
View file

@ -0,0 +1,22 @@
#Type Name ID GECOS Home directory Shell
g nixbld -
u nixbld-1 - "Nix build user 1" /var/empty /sbin/nologin
u nixbld-2 - "Nix build user 2" /var/empty /sbin/nologin
u nixbld-3 - "Nix build user 3" /var/empty /sbin/nologin
u nixbld-4 - "Nix build user 4" /var/empty /sbin/nologin
u nixbld-5 - "Nix build user 5" /var/empty /sbin/nologin
u nixbld-6 - "Nix build user 6" /var/empty /sbin/nologin
u nixbld-7 - "Nix build user 7" /var/empty /sbin/nologin
u nixbld-8 - "Nix build user 8" /var/empty /sbin/nologin
u nixbld-9 - "Nix build user 9" /var/empty /sbin/nologin
u nixbld-10 - "Nix build user 10" /var/empty /sbin/nologin
m nixbld-1 nixbld
m nixbld-2 nixbld
m nixbld-3 nixbld
m nixbld-4 nixbld
m nixbld-5 nixbld
m nixbld-6 nixbld
m nixbld-7 nixbld
m nixbld-8 nixbld
m nixbld-9 nixbld
m nixbld-10 nixbld

5
plans/parse.fmf Normal file
View file

@ -0,0 +1,5 @@
summary: Basic smoke test
discover:
how: fmf
execute:
how: tmt

4
registry.json Normal file
View file

@ -0,0 +1,4 @@
{
"version":2,
"flakes": []
}

1
sources Normal file
View file

@ -0,0 +1 @@
SHA512 (nix-2.31.2.tar.gz) = ba2aa53cfb2527c7702340ac862a427a07d4a7bac8149cfc24d34ce2e0f980a8e70103e1ddf1c231cb5cd0bf4ddfe56a6fa618cd561501a03b8b064cea84bfcf

1
tests/smoke/examples Symbolic link
View file

@ -0,0 +1 @@
../../examples

6
tests/smoke/main.fmf Normal file
View file

@ -0,0 +1,6 @@
summary: parse unicode data
require:
- bash
- nix
test: bash test.sh
framework: shell

13
tests/smoke/test.sh Normal file
View file

@ -0,0 +1,13 @@
#!/bin/bash
set -x -e
nix-shell -p hello --command hello
( cd examples/default
nix-build
)
( cd examples/shell
nix-shell --command "bash --version"
)