Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
0aa79dc
Remove StoreType abstraction and delegate regStore
meditans Jul 17, 2020
0263971
Merge branch 'allow-relative-paths-in-store-option' into remove-store…
Ericson2314 Jul 21, 2020
d5af576
Merge branch 'master' of github.com:NixOS/nix into remove-storetype-d…
Ericson2314 Aug 19, 2020
a83694c
Use `RemoteStore` to open connection for proxying daemon
Ericson2314 Aug 19, 2020
3df7885
Fix max fd calc and add test
Ericson2314 Aug 20, 2020
c08c9f0
Merge remote-tracking branch 'upstream/master' into remove-storetype-…
Ericson2314 Sep 15, 2020
7d5bdf8
Make the store plugins more introspectable
thufschmitt Sep 8, 2020
fa32560
Fix the registration of stores
thufschmitt Sep 9, 2020
3b57181
Separate the instantiation and initialisation of the stores
thufschmitt Sep 9, 2020
3c525d1
Complete the `toJSON` instance for `Setting<T>`
thufschmitt Sep 9, 2020
35042c9
Add a default value for the settings
thufschmitt Sep 9, 2020
aa4eac3
fixup! Separate the instantiation and initialisation of the stores
thufschmitt Sep 9, 2020
22afa8f
Separate store configs from the implems
thufschmitt Sep 10, 2020
dae39f0
Make `nix describe-stores` functional
thufschmitt Sep 10, 2020
d184ad1
fixup! Make the store plugins more introspectable
thufschmitt Sep 11, 2020
5895184
Correctly call all the parent contructors of the stores
thufschmitt Sep 11, 2020
7f103dc
Properly filter the stores according to their declared uriSchemes
thufschmitt Sep 11, 2020
1129913
fixup! Correctly call all the parent contructors of the stores
thufschmitt Sep 11, 2020
29a6323
fixup! Make the store plugins more introspectable
thufschmitt Sep 11, 2020
d65962d
Make uri schemes grammar more RFC-compliant
thufschmitt Sep 11, 2020
f24f088
Document the new store hierarchy
thufschmitt Sep 14, 2020
b73adac
Add a name to the stores
thufschmitt Sep 14, 2020
634cb2a
Add a markdown output to `nix describe-stores`
thufschmitt Sep 14, 2020
888f7af
Fix build issues with gcc
thufschmitt Sep 14, 2020
a1e82ba
fixup! Add a default value for the settings
thufschmitt Sep 14, 2020
fc2d31c
Add `(StoreConfig*)` casts to work around a GCC bug
thufschmitt Sep 15, 2020
93c0e14
Include the full nlohmann/json header in config.hh
thufschmitt Sep 15, 2020
e0817cb
Don't include nlohmann/json.hpp in config.hh
thufschmitt Sep 16, 2020
d72927a
Fix the s3 store
thufschmitt Sep 16, 2020
c29624b
Add a test for `nix describe-stores`
thufschmitt Sep 16, 2020
77a0e2c
Remove useless exception copy
regnat Sep 16, 2020
2eacc1b
builtins.toFile: Fix indentation
edolstra Sep 16, 2020
39bc493
jq -> nix
edolstra Sep 16, 2020
0066ef6
Fix doc generation
edolstra Sep 16, 2020
5080d4e
Merge branch 'document-store-options' of https://github.com/tweag/nix
edolstra Sep 16, 2020
b7c0223
Fix the nix-daemon Mac OS SSL CA cert
maljub01 Sep 16, 2020
f60b380
Merge remote-tracking branch 'upstream/master' into remove-storetype-…
Ericson2314 Sep 16, 2020
10d1865
Remove corepkgs/derivation.nix
edolstra Sep 17, 2020
787469c
Remove corepkgs/unpack-channel.nix
edolstra Sep 17, 2020
c9f51e8
Remove corepkgs/config.nix
edolstra Sep 17, 2020
520895b
Fix garbage collection of CA derivations
thufschmitt Sep 17, 2020
fe5cbfd
Merge pull request #4025 from NixOS/remove-corepkgs-config
edolstra Sep 17, 2020
b94a35e
Merge pull request #4027 from tweag/fix-gc-of-ca-derivations
edolstra Sep 17, 2020
649d3aa
Merge pull request #3829 from obsidiansystems/remove-storetype-delega…
edolstra Sep 17, 2020
958bf57
nix build: find() -> get()
edolstra Sep 18, 2020
2bcf8cb
libfetchers/github: allow `url` attribute
Ma27 Sep 18, 2020
5fe375a
nix-prefetch-url: Add --executable flag
chreekat Sep 18, 2020
d93b373
Merge pull request #4036 from chreekat/b/prefetch-executable
edolstra Sep 21, 2020
18eb077
Merge pull request #4023 from maljub01/patch-2
edolstra Sep 21, 2020
9aa0daf
Update lowdown version
thufschmitt Sep 21, 2020
fd721f0
Merge pull request #4043 from tweag/update-lowdown
edolstra Sep 21, 2020
d110fdd
Disable precompiled headers in 'nix develop'
edolstra Sep 21, 2020
56f1e0d
libfetchers/github: rename `url` to `host`
Ma27 Sep 21, 2020
cbe0bb2
Merge pull request #4035 from Ma27/url-attr
edolstra Sep 21, 2020
e8e1d42
Don't include <regex> in header files
edolstra Sep 21, 2020
d51ba43
Move Callback into its own header
edolstra Sep 21, 2020
340ca38
Don't include nlohmann/json.hpp in globals.hh
edolstra Sep 21, 2020
0716ada
abstractsettingtojson.hh -> abstract-setting-to-json.hh
edolstra Sep 21, 2020
557d242
Random header cleanup
edolstra Sep 21, 2020
ecc8672
fmt.hh: Don't include boost/algorithm/string/replace.hpp
edolstra Sep 21, 2020
1d3c6ae
Merge remote-tracking branch 'upstream/master' into ipfs-binary-cache…
Ericson2314 Sep 22, 2020
cde9c15
WIP: Get IPFS store working with StoreConfig refactor
Ericson2314 Sep 22, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,6 @@ perl/Makefile.config
/svn-revision
/libtool

/corepkgs/config.nix

# /corepkgs/channels/
/corepkgs/channels/unpack.sh

# /corepkgs/nar/
/corepkgs/nar/nar.sh
/corepkgs/nar/unnar.sh

# /doc/manual/
/doc/manual/*.1
/doc/manual/*.5
Expand Down
13 changes: 0 additions & 13 deletions corepkgs/config.nix.in

This file was deleted.

6 changes: 1 addition & 5 deletions corepkgs/local.mk
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
corepkgs_FILES = \
unpack-channel.nix \
derivation.nix \
fetchurl.nix

$(foreach file,config.nix $(corepkgs_FILES),$(eval $(call install-data-in,$(d)/$(file),$(datadir)/nix/corepkgs)))

template-files += $(d)/config.nix
$(foreach file,$(corepkgs_FILES),$(eval $(call install-data-in,$(d)/$(file),$(datadir)/nix/corepkgs)))
6 changes: 0 additions & 6 deletions doc/manual/generate-builtins.jq

This file was deleted.

14 changes: 14 additions & 0 deletions doc/manual/generate-builtins.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
with builtins;
with import ./utils.nix;

builtins:

concatStrings (map
(name:
let builtin = builtins.${name}; in
" - `builtins.${name}` " + concatStringsSep " " (map (s: "*${s}*") builtin.args)
+ " \n\n"
+ concatStrings (map (s: " ${s}\n") (splitLines builtin.doc)) + "\n\n"
)
(attrNames builtins))

44 changes: 0 additions & 44 deletions doc/manual/generate-manpage.jq

This file was deleted.

56 changes: 56 additions & 0 deletions doc/manual/generate-manpage.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
with builtins;
with import ./utils.nix;

let

showCommand =
{ command, section, def }:
"${section} Name\n\n"
+ "`${command}` - ${def.description}\n\n"
+ "${section} Synopsis\n\n"
+ showSynopsis { inherit command; args = def.args; }
+ (if def ? doc
then "${section} Description\n\n" + def.doc + "\n\n"
else "")
+ (let s = showFlags def.flags; in
if s != ""
then "${section} Flags\n\n${s}"
else "")
+ (if def.examples or [] != []
then
"${section} Examples\n\n"
+ concatStrings (map ({ description, command }: "${description}\n\n```console\n${command}\n```\n\n") def.examples)
else "")
+ (if def.commands or [] != []
then concatStrings (
map (name:
"# Subcommand `${command} ${name}`\n\n"
+ showCommand { command = command + " " + name; section = "##"; def = def.commands.${name}; })
(attrNames def.commands))
else "");

showFlags = flags:
concatStrings
(map (longName:
let flag = flags.${longName}; in
if flag.category or "" != "config"
then
" - `--${longName}`"
+ (if flag ? shortName then " / `${flag.shortName}`" else "")
+ (if flag ? labels then " " + (concatStringsSep " " (map (s: "*${s}*") flag.labels)) else "")
+ " \n"
+ " " + flag.description + "\n\n"
else "")
(attrNames flags));

showSynopsis =
{ command, args }:
"`${command}` [*flags*...] ${concatStringsSep " "
(map (arg: "*${arg.label}*" + (if arg ? arity then "" else "...")) args)}\n\n";

in

command:

"Title: nix\n\n"
+ showCommand { command = "nix"; section = "#"; def = command; }
16 changes: 0 additions & 16 deletions doc/manual/generate-options.jq

This file was deleted.

21 changes: 21 additions & 0 deletions doc/manual/generate-options.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
with builtins;
with import ./utils.nix;

options:

concatStrings (map
(name:
let option = options.${name}; in
" - `${name}` \n\n"
+ concatStrings (map (s: " ${s}\n") (splitLines option.description)) + "\n\n"
+ " **Default:** " + (
if option.value == "" || option.value == []
then "*empty*"
else if isBool option.value
then (if option.value then "`true`" else "`false`")
else "`" + toString option.value + "`") + "\n\n"
+ (if option.aliases != []
then " **Deprecated alias:** " + (concatStringsSep ", " (map (s: "`${s}`") option.aliases)) + "\n\n"
else "")
)
(attrNames options))
30 changes: 19 additions & 11 deletions doc/manual/local.mk
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ clean-files += $(d)/*.1 $(d)/*.5 $(d)/*.8

dist-files += $(man-pages)

nix-eval = $(bindir)/nix eval --experimental-features nix-command -I nix/corepkgs=corepkgs --store dummy:// --impure --raw --expr

$(d)/%.1: $(d)/src/command-ref/%.md
$(trace-gen) lowdown -sT man $^ -o $@

Expand All @@ -24,25 +26,31 @@ $(d)/%.8: $(d)/src/command-ref/%.md
$(d)/nix.conf.5: $(d)/src/command-ref/conf-file.md
$(trace-gen) lowdown -sT man $^ -o $@

$(d)/src/command-ref/nix.md: $(d)/nix.json $(d)/generate-manpage.jq
jq -r -f doc/manual/generate-manpage.jq $< > $@
$(d)/src/command-ref/nix.md: $(d)/nix.json $(d)/generate-manpage.nix $(bindir)/nix
$(trace-gen) $(nix-eval) 'import doc/manual/generate-manpage.nix (builtins.fromJSON (builtins.readFile $<))' > $@.tmp
@mv $@.tmp $@

$(d)/src/command-ref/conf-file.md: $(d)/conf-file.json $(d)/generate-options.jq $(d)/src/command-ref/conf-file-prefix.md
cat doc/manual/src/command-ref/conf-file-prefix.md > $@
jq -r -f doc/manual/generate-options.jq $< >> $@
$(d)/src/command-ref/conf-file.md: $(d)/conf-file.json $(d)/generate-options.nix $(d)/src/command-ref/conf-file-prefix.md $(bindir)/nix
@cat doc/manual/src/command-ref/conf-file-prefix.md > $@.tmp
$(trace-gen) $(nix-eval) 'import doc/manual/generate-options.nix (builtins.fromJSON (builtins.readFile $<))' >> $@.tmp
@mv $@.tmp $@

$(d)/nix.json: $(bindir)/nix
$(trace-gen) $(bindir)/nix __dump-args > $@
$(trace-gen) $(bindir)/nix __dump-args > $@.tmp
@mv $@.tmp $@

$(d)/conf-file.json: $(bindir)/nix
$(trace-gen) env -i NIX_CONF_DIR=/dummy HOME=/dummy $(bindir)/nix show-config --json --experimental-features nix-command > $@
$(trace-gen) env -i NIX_CONF_DIR=/dummy HOME=/dummy $(bindir)/nix show-config --json --experimental-features nix-command > $@.tmp
@mv $@.tmp $@

$(d)/src/expressions/builtins.md: $(d)/builtins.json $(d)/generate-builtins.jq $(d)/src/expressions/builtins-prefix.md
cat doc/manual/src/expressions/builtins-prefix.md > $@
jq -r -f doc/manual/generate-builtins.jq $< >> $@
$(d)/src/expressions/builtins.md: $(d)/builtins.json $(d)/generate-builtins.nix $(d)/src/expressions/builtins-prefix.md $(bindir)/nix
@cat doc/manual/src/expressions/builtins-prefix.md > $@.tmp
$(trace-gen) $(nix-eval) 'import doc/manual/generate-builtins.nix (builtins.fromJSON (builtins.readFile $<))' >> $@.tmp
@mv $@.tmp $@

$(d)/builtins.json: $(bindir)/nix
$(trace-gen) $(bindir)/nix __dump-builtins > $@
$(trace-gen) NIX_PATH=nix/corepkgs=corepkgs $(bindir)/nix __dump-builtins > $@.tmp
mv $@.tmp $@

# Generate the HTML manual.
install: $(docdir)/manual/index.html
Expand Down
3 changes: 3 additions & 0 deletions doc/manual/src/command-ref/nix-prefetch-url.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ Nix store is also printed.
result to the Nix store. The resulting hash can be used with
functions such as Nixpkgs’s `fetchzip` or `fetchFromGitHub`.

- `--executable`
Set the executable bit on the downloaded file.

- `--name` *name*
Override the name of the file in the Nix store. By default, this is
`hash-basename`, where *basename* is the last component of *url*.
Expand Down
7 changes: 7 additions & 0 deletions doc/manual/utils.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
with builtins;

{
splitLines = s: filter (x: !isList x) (split "\n" s);

concatStrings = concatStringsSep "";
}
11 changes: 5 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
description = "The purely functional package manager";

inputs.nixpkgs.url = "nixpkgs/nixos-20.03-small";
inputs.lowdown-src = { url = "github:edolstra/lowdown/no-structs-in-anonymous-unions"; flake = false; };
inputs.lowdown-src = { url = "github:kristapsdz/lowdown"; flake = false; };

outputs = { self, nixpkgs, lowdown-src }:

Expand Down Expand Up @@ -137,7 +137,7 @@

enableParallelBuilding = true;

makeFlags = "profiledir=$(out)/etc/profile.d";
makeFlags = "profiledir=$(out)/etc/profile.d PRECOMPILE_HEADERS=1";

doCheck = true;

Expand Down Expand Up @@ -335,9 +335,6 @@
# syntax-check generated dot files, it still requires some
# fonts. So provide those.
FONTCONFIG_FILE = texFunctions.fontsConf;

# To test building without precompiled headers.
makeFlagsArray = [ "PRECOMPILE_HEADERS=0" ];
};

# System tests.
Expand Down
2 changes: 2 additions & 0 deletions misc/launchd/org.nixos.nix-daemon.plist.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<dict>
<key>EnvironmentVariables</key>
<dict>
<key>NIX_SSL_CERT_FILE</key>
<string>/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt</string>
<key>OBJC_DISABLE_INITIALIZE_FORK_SAFETY</key>
<string>YES</string>
</dict>
Expand Down
2 changes: 1 addition & 1 deletion mk/precompiled-headers.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PRECOMPILE_HEADERS ?= 1
PRECOMPILE_HEADERS ?= 0

print-var-help += \
echo " PRECOMPILE_HEADERS ($(PRECOMPILE_HEADERS)): Whether to use precompiled headers to speed up the build";
Expand Down
13 changes: 0 additions & 13 deletions perl/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,6 @@ PKG_CHECK_MODULES([NIX], [nix-store])

NEED_PROG([NIX], [nix])

# Get nix configure values
export NIX_REMOTE=daemon
nixbindir=$("$NIX" --experimental-features nix-command eval --raw -f '<nix/config.nix>' nixBinDir)
nixlibexecdir=$("$NIX" --experimental-features nix-command eval --raw -f '<nix/config.nix>' nixLibexecDir)
nixlocalstatedir=$("$NIX" --experimental-features nix-command eval --raw -f '<nix/config.nix>' nixLocalstateDir)
nixsysconfdir=$("$NIX" --experimental-features nix-command eval --raw -f '<nix/config.nix>' nixSysconfDir)
nixstoredir=$("$NIX" --experimental-features nix-command eval --raw -f '<nix/config.nix>' nixStoreDir)
AC_SUBST(nixbindir)
AC_SUBST(nixlibexecdir)
AC_SUBST(nixlocalstatedir)
AC_SUBST(nixsysconfdir)
AC_SUBST(nixstoredir)

# Expand all variables in config.status.
test "$prefix" = NONE && prefix=$ac_default_prefix
test "$exec_prefix" = NONE && exec_prefix='${prefix}'
Expand Down
10 changes: 2 additions & 8 deletions perl/lib/Nix/Config.pm.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,8 @@ use MIME::Base64;

$version = "@PACKAGE_VERSION@";

$binDir = $ENV{"NIX_BIN_DIR"} || "@nixbindir@";
$libexecDir = $ENV{"NIX_LIBEXEC_DIR"} || "@nixlibexecdir@";
$stateDir = $ENV{"NIX_STATE_DIR"} || "@nixlocalstatedir@/nix";
$logDir = $ENV{"NIX_LOG_DIR"} || "@nixlocalstatedir@/log/nix";
$confDir = $ENV{"NIX_CONF_DIR"} || "@nixsysconfdir@/nix";
$storeDir = $ENV{"NIX_STORE_DIR"} || "@nixstoredir@";

$useBindings = 1;
$binDir = Nix::Store::getBinDir;
$storeDir = Nix::Store::getStoreDir;

%config = ();

Expand Down
Loading