blob: b222bc362f40b0d6d922ff1f17b8529389e214f1 (
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
{
stdenv,
lib,
stdenvNoCC,
fetchzip,
sourceData,
versionData,
buildFreebsd,
patchesRoot,
writeText,
}:
self:
lib.packagesFromDirectoryRecursive {
callPackage = self.callPackage;
directory = ./pkgs;
}
// {
inherit sourceData patchesRoot versionData;
patches = ./patches + "/${self.versionData.revision}";
# Keep the crawled portion of Nixpkgs finite.
buildFreebsd = lib.dontRecurseIntoAttrs buildFreebsd // {
__attrsFailEvaluation = true;
};
ports = fetchzip {
url = "https://cgit.freebsd.org/ports/snapshot/ports-dde3b2b456c3a4bdd217d0bf3684231cc3724a0a.tar.gz";
sha256 = "BpHqJfnGOeTE7tkFJBx0Wk8ryalmf4KNTit/Coh026E=";
};
compatIsNeeded = !stdenvNoCC.hostPlatform.isFreeBSD;
compatIfNeeded = lib.optional self.compatIsNeeded self.compat;
freebsd-lib = import ./lib {
version = lib.concatStringsSep "." (
map toString (
lib.filter (x: x != null) [
self.versionData.major
self.versionData.minor
self.versionData.patch or null
]
)
);
inherit lib writeText;
};
# The manual callPackages below should in principle be unnecessary, but are
# necessary. See note in ../netbsd/default.nix
compat = self.callPackage ./pkgs/compat/package.nix {
inherit stdenv;
inherit (buildFreebsd) makeMinimal;
};
csu = self.callPackage ./pkgs/csu.nix {
inherit (buildFreebsd) makeMinimal install gencat;
inherit (self) include;
};
include = self.callPackage ./pkgs/include/package.nix { inherit (buildFreebsd) rpcgen mtree; };
install = self.callPackage ./pkgs/install.nix {
inherit (buildFreebsd) makeMinimal;
inherit (self) libmd libnetbsd;
};
libc = self.callPackage ./pkgs/libc/package.nix {
inherit (buildFreebsd)
makeMinimal
install
gencat
rpcgen
mkcsmapper
mkesdb
;
inherit (self) csu include;
};
libnetbsd = self.callPackage ./pkgs/libnetbsd/package.nix { inherit (buildFreebsd) makeMinimal; };
libmd = self.callPackage ./pkgs/libmd.nix { inherit (buildFreebsd) makeMinimal; };
mkDerivation = self.callPackage ./pkgs/mkDerivation.nix {
inherit stdenv;
inherit (buildFreebsd)
freebsdSetupHook
makeMinimal
install
tsort
lorder
;
};
makeMinimal = self.callPackage ./pkgs/makeMinimal.nix { inherit (self) make; };
mtree = self.callPackage ./pkgs/mtree.nix { inherit (self) libnetbsd libmd; };
tsort = self.callPackage ./pkgs/tsort.nix { inherit (buildFreebsd) makeMinimal install; };
}
|