-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault.nix
More file actions
84 lines (73 loc) · 2.66 KB
/
Copy pathdefault.nix
File metadata and controls
84 lines (73 loc) · 2.66 KB
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
75
76
77
78
79
80
81
82
83
84
# This file describes your repository contents.
# It should return a set of nix derivations
# and optionally the special attributes `lib`, `modules` and `overlays`.
# It should NOT import <nixpkgs>. Instead, you should take pkgs as an argument.
# Having pkgs default to <nixpkgs> is fine though, and it lets you use short
# commands such as:
# nix-build -A mypackage
{
pkgs ? import <nixpkgs> { },
lib ? pkgs.lib,
# flake.nix passes `self`; it is not required, so plain `nix-build -A <pkg>`
# and NUR's `import ./. { inherit pkgs; }` keep working.
...
}:
let
sources = pkgs.callPackage ./_sources/generated.nix {
inherit (pkgs) fetchFromGitHub fetchurl fetchgit;
};
# Everything under pkgs/ comes from one manifest shared with overlay.nix and
# flake.nix, so the lists cannot drift. Packages whose meta.platforms excludes
# the current system are dropped rather than set to null.
manifest = import ./pkgs/manifest.nix { inherit lib; };
discoveredPackages = manifest.callAvailable pkgs.stdenv.hostPlatform pkgs.callPackage;
isLinux = pkgs.stdenv.hostPlatform.isLinux;
# Shared by the LDAP-enabled rebuilds below.
cyrusSaslWithLdap = (pkgs.cyrus_sasl.override { enableLdap = true; }).overrideAttrs (_: {
postInstall = ''
ln -sf ${discoveredPackages.ldap-passthrough-conf}/slapd.conf $out/lib/sasl2/
ln -sf ${discoveredPackages.ldap-passthrough-conf}/smtpd.conf $out/lib/sasl2/
'';
});
# Linux-only rebuilds of nixpkgs packages (not definitions under pkgs/).
linuxPackages = lib.optionalAttrs isLinux {
cyrus_sasl_with_ldap = cyrusSaslWithLdap;
openldap_with_cyrus_sasl =
(pkgs.openldap.overrideAttrs (old: {
configureFlags = old.configureFlags ++ [
"--enable-spasswd"
"--with-cyrus-sasl"
];
doCheck = false;
})).override
{ cyrus_sasl = cyrusSaslWithLdap; };
postfix_with_ldap = pkgs.postfix.override { cyrus_sasl = cyrusSaslWithLdap; };
sssd_with_sude = pkgs.sssd.override { withSudo = true; };
sudo_with_sssd = pkgs.sudo.override {
sssd = pkgs.sssd.override { withSudo = true; };
withInsults = true;
withSssd = true;
};
};
# Define librime with lua5_2 support
librime =
(pkgs.librime.override {
plugins = [ sources.librime-lua.src ];
}).overrideAttrs
(old: {
buildInputs = old.buildInputs ++ [ pkgs.lua5_2 ];
nativeBuildInputs = old.nativeBuildInputs ++ [
pkgs.lua5_2
pkgs.pkg-config
];
});
in
discoveredPackages
// linuxPackages
// {
inherit librime;
default = librime;
wrangler = pkgs.wrangler.overrideAttrs (_: {
dontCheckForBrokenSymlinks = true;
});
}