mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-12-05 03:46:16 +02:00
c9f51e8705
This isn't used anywhere except in the configure script of the Perl bindings. I've changed the latter to use the C++ API's Settings object at runtime.
24 lines
439 B
Perl
24 lines
439 B
Perl
package Nix::Config;
|
|
|
|
use MIME::Base64;
|
|
|
|
$version = "@PACKAGE_VERSION@";
|
|
|
|
$binDir = Nix::Store::getBinDir;
|
|
$storeDir = Nix::Store::getStoreDir;
|
|
|
|
%config = ();
|
|
|
|
sub readConfig {
|
|
my $config = "$confDir/nix.conf";
|
|
return unless -f $config;
|
|
|
|
open CONFIG, "<$config" or die "cannot open '$config'";
|
|
while (<CONFIG>) {
|
|
/^\s*([\w\-\.]+)\s*=\s*(.*)$/ or next;
|
|
$config{$1} = $2;
|
|
}
|
|
close CONFIG;
|
|
}
|
|
|
|
return 1;
|