about summary refs log tree commit diff
path: root/third_party/nix/scripts/meson.build
blob: 8787a185d03ee7563e3098353438bdb7ab319a22 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Nix corepkgs build file
#============================================================================




# src files
#============================================================================

scripts_data = files(
    join_paths(meson.source_root(), 'scripts/install-darwin-multi-user.sh'),
    join_paths(meson.source_root(), 'scripts/install-multi-user.sh'))





# targets
#============================================================================

nix_profile_sh = configuration_data()
nix_profile_sh.set('localstatedir', localstatedir)
nix_profile_sh.set('coreutils', coreutils)

nix_http_export_cgi = configuration_data()
nix_http_export_cgi.set('bindir', bindir)
nix_http_export_cgi.set('localstatedir', localstatedir)
nix_http_export_cgi.set('coreutils', coreutils)
nix_http_export_cgi.set('gzip', gzip.path())

nix_reduce_build = configuration_data()
nix_reduce_build.set('bash', bash.path())
nix_reduce_build.set('bindir', bindir)
nix_reduce_build.set('localstatedir', localstatedir)


# TODO: make these work
nix_install = configuration_data()
nix_install.set('nixVersion', package_version)
nix_install.set('binaryTarball_x86_64-linux', '')
nix_install.set('binaryTarball_i686-linux', '')
nix_install.set('binaryTarball_aarch64-linux', '')
nix_install.set('binaryTarball_x86_64-darwin', '')




# build
#============================================================================

scripts_data += configure_file(
    input : 'nix-profile.sh.in',
    output : 'nix.sh',
    configuration : nix_profile_sh)

scripts_data += configure_file(
    input : 'nix-profile-daemon.sh.in',
    output : 'nix-daemon.sh',
    configuration : nix_profile_sh)

scripts_data += configure_file(
    input : 'nix-http-export.cgi.in',
    output : 'nix-http-export.cgi',
    configuration : nix_http_export_cgi)

scripts_data += configure_file(
    input : 'nix-reduce-build.in',
    output : 'nix-reduce-build',
    configuration : nix_reduce_build)

install_data(
    scripts_data,
    install_mode : 'rwxr-xr-x',
    install_dir : profiledir)