forked from lix-project/lix
* In nix-pull/nix-channel, create the manifests directory if it
doesn't exist. The Debian packages don't include the manifests directory, so nix-channel would silently skip doing a nix-pull, resulting in everything being built from source. Thanks to Juan Pedro Bolívar Puente.
This commit is contained in:
parent
327a232c85
commit
3392d32e8b
|
@ -78,6 +78,9 @@ sub removeChannel {
|
||||||
sub update {
|
sub update {
|
||||||
readChannels;
|
readChannels;
|
||||||
|
|
||||||
|
# Create the manifests directory if it doesn't exist.
|
||||||
|
mkdir "$stateDir/manifests", 0755 unless -e "$stateDir/manifests";
|
||||||
|
|
||||||
# Do we have write permission to the manifests directory? If not,
|
# Do we have write permission to the manifests directory? If not,
|
||||||
# then just skip pulling the manifest and just download the Nix
|
# then just skip pulling the manifest and just download the Nix
|
||||||
# expressions. If the user is a non-privileged user in a
|
# expressions. If the user is a non-privileged user in a
|
||||||
|
|
|
@ -18,6 +18,12 @@ my $manifestDir = ($ENV{"NIX_MANIFESTS_DIR"} or "$stateDir/manifests");
|
||||||
umask 0022;
|
umask 0022;
|
||||||
|
|
||||||
|
|
||||||
|
# Create the manifests directory if it doesn't exist.
|
||||||
|
if (! -e $manifestDir) {
|
||||||
|
mkdir $manifestDir, 0755 or die "cannot create directory `$manifestDir'";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# Process the URLs specified on the command line.
|
# Process the URLs specified on the command line.
|
||||||
my %narFiles;
|
my %narFiles;
|
||||||
my %localPaths;
|
my %localPaths;
|
||||||
|
|
|
@ -36,12 +36,6 @@ ln -s $TOP/scripts/copy-from-other-stores.pl $NIX_BIN_DIR/nix/
|
||||||
ln -s $TOP/scripts/download-using-manifests.pl $NIX_BIN_DIR/nix/
|
ln -s $TOP/scripts/download-using-manifests.pl $NIX_BIN_DIR/nix/
|
||||||
ln -s $TOP/scripts/readmanifest.pm $NIX_BIN_DIR/nix/
|
ln -s $TOP/scripts/readmanifest.pm $NIX_BIN_DIR/nix/
|
||||||
|
|
||||||
mkdir -p "$NIX_STATE_DIR"/manifests
|
|
||||||
mkdir -p "$NIX_STATE_DIR"/gcroots
|
|
||||||
mkdir -p "$NIX_STATE_DIR"/temproots
|
|
||||||
mkdir -p "$NIX_STATE_DIR"/profiles
|
|
||||||
ln -s "$NIX_STATE_DIR"/profiles "$NIX_STATE_DIR"/gcroots/
|
|
||||||
|
|
||||||
cat > "$NIX_CONF_DIR"/nix.conf <<EOF
|
cat > "$NIX_CONF_DIR"/nix.conf <<EOF
|
||||||
gc-keep-outputs = false
|
gc-keep-outputs = false
|
||||||
gc-keep-derivations = false
|
gc-keep-derivations = false
|
||||||
|
|
Loading…
Reference in a new issue