Skip to content
This repository has been archived by the owner on Feb 26, 2025. It is now read-only.

Commit

Permalink
nix: split data-dir option in 2
Browse files Browse the repository at this point in the history
  • Loading branch information
tristan0x committed Jul 20, 2018
1 parent 3453e56 commit adfcf54
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions var/spack/repos/builtin/packages/nix/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,11 @@ class Nix(AutotoolsPackage):
url = "https://github.com/NixOS/nix/archive/2.0.4.zip"

version('2.0.4', '045adeb4714f559386e391cc3c411710')
variant('data-dir', values=str, default=None,
description='Data root directory (default is /nix)')

variant('storedir', values=str, default=None,
description='path of the Nix store (defaults to /nix)')
variant('statedir', values=str, default=None,
description='path to the locale state (defaults to /nix/var)')
variant('doc', values=bool, default=True,
description="Build and install documentation")
variant('sandboxing', values=bool, default=True,
Expand All @@ -60,10 +63,10 @@ def configure_args(self):
args.append('--disable-seccomp-sandboxing')
if '+doc' not in self.spec:
args.append('--disable-doc-gen')
data_dir = self.spec.variants['data-dir'].value
if data_dir:
args += [
'--with-store-dir=' + osp.join(data_dir, 'store'),
'--localstatedir=' + osp.join(data_dir, 'var'),
]
storedir = self.spec.variants['storedir'].value
if storedir:
args.append('--with-store-dir=' + storedir)
statedir = self.spec.variants['statedir'].value
if statedir:
args.append('--localstatedir=' + statedir)
return args

0 comments on commit adfcf54

Please sign in to comment.