* nix-channel: use nix-build.
This commit is contained in:
parent
f052c10eed
commit
8ab6bc5a49
|
@ -125,15 +125,13 @@ sub update {
|
||||||
|
|
||||||
my $rootFile = "$rootsDir/per-user/$userName/channels";
|
my $rootFile = "$rootsDir/per-user/$userName/channels";
|
||||||
|
|
||||||
# Instantiate the Nix expression.
|
# Build the Nix expression.
|
||||||
print "unpacking channel Nix expressions...\n";
|
print "unpacking channel Nix expressions...\n";
|
||||||
my $storeExpr = `@bindir@/nix-instantiate --add-root '$rootFile'.tmp @datadir@/nix/corepkgs/channels/unpack.nix --argstr system @system@ --arg inputs '$inputs'`
|
my $outPath = `\\
|
||||||
or die "cannot instantiate Nix expression";
|
@bindir@/nix-build --out-link '$rootFile' --drv-link '$rootFile'.tmp \\
|
||||||
chomp $storeExpr;
|
@datadir@/nix/corepkgs/channels/unpack.nix \\
|
||||||
|
--argstr system @system@ --arg inputs '$inputs'`
|
||||||
# Build the resulting derivation.
|
or die "cannot unpack the channels";
|
||||||
my $outPath = `@bindir@/nix-store --add-root '$rootFile' -r '$storeExpr'`
|
|
||||||
or die "cannot realise store expression";
|
|
||||||
chomp $outPath;
|
chomp $outPath;
|
||||||
|
|
||||||
unlink "$rootFile.tmp";
|
unlink "$rootFile.tmp";
|
||||||
|
|
Loading…
Reference in a new issue