python312Packages.vdf: avoid using pname for src.repo
[NixPkgs.git] / pkgs / os-specific / bsd / netbsd / default.nix
blobdc38be2f1d97243272d3de478f24895360380147
2   lib,
3   stdenvNoLibc,
4   stdenvNoCC,
5   makeScopeWithSplicing',
6   generateSplicesForMkScope,
7   buildPackages,
8   fetchcvs,
9 }:
11 let
12   otherSplices = generateSplicesForMkScope "netbsd";
13   buildNetbsd = otherSplices.selfBuildHost;
16 makeScopeWithSplicing' {
17   inherit otherSplices;
18   f = (
19     self:
20     lib.packagesFromDirectoryRecursive {
21       callPackage = self.callPackage;
22       directory = ./pkgs;
23     }
24     // {
25       version = "9.2";
27       defaultMakeFlags = [
28         "MKSOFTFLOAT=${
29           if
30             stdenvNoCC.hostPlatform.gcc.float or (stdenvNoCC.hostPlatform.parsed.abi.float or "hard") == "soft"
31           then
32             "yes"
33           else
34             "no"
35         }"
36       ];
38       compatIfNeeded = lib.optional (!stdenvNoCC.hostPlatform.isNetBSD) self.compat;
40       stdenvLibcMinimal = stdenvNoLibc.override (old: {
41         cc = old.cc.override {
42           libc = self.libcMinimal;
43           noLibc = false;
44           bintools = old.cc.bintools.override {
45             libc = self.libcMinimal;
46             noLibc = false;
47             sharedLibraryLoader = null;
48           };
49         };
50       });
52       # The manual callPackages below should in principle be unnecessary because
53       # they're just selecting arguments that would be selected anyway. However,
54       # if we don't perform these manual calls, we get infinite recursion issues
55       # because of the splices.
57       compat = self.callPackage ./pkgs/compat/package.nix {
58         inherit (buildPackages) coreutils;
59         inherit (buildNetbsd) makeMinimal;
60         inherit (self) install;
61       };
63       config = self.callPackage ./pkgs/config.nix {
64         inherit (buildNetbsd) makeMinimal install;
65         inherit (self) cksum;
66       };
68       csu = self.callPackage ./pkgs/csu.nix {
69         inherit (self) headers sys-headers ld_elf_so;
70         inherit (buildNetbsd)
71           netbsdSetupHook
72           makeMinimal
73           install
74           genassym
75           gencat
76           lorder
77           tsort
78           statHook
79           ;
80       };
82       include = self.callPackage ./pkgs/include.nix {
83         inherit (buildNetbsd)
84           makeMinimal
85           install
86           nbperf
87           rpcgen
88           ;
89         inherit (buildPackages) stdenv;
90       };
92       install = self.callPackage ./pkgs/install/package.nix {
93         inherit (self)
94           fts
95           mtree
96           make
97           compatIfNeeded
98           ;
99         inherit (buildNetbsd) makeMinimal;
100       };
102       libcMinimal = self.callPackage ./pkgs/libcMinimal/package.nix {
103         inherit (self) headers csu;
104         inherit (buildNetbsd)
105           netbsdSetupHook
106           makeMinimal
107           install
108           genassym
109           gencat
110           lorder
111           tsort
112           statHook
113           rpcgen
114           ;
115       };
117       libpthread-headers = self.callPackage ./pkgs/libpthread/headers.nix { };
119       librpcsvc = self.callPackage ./pkgs/librpcsvc.nix {
120         inherit (buildNetbsd)
121           netbsdSetupHook
122           makeMinimal
123           install
124           lorder
125           tsort
126           statHook
127           rpcgen
128           ;
129       };
131       libutil = self.callPackage ./pkgs/libutil.nix {
132         inherit (buildNetbsd)
133           netbsdSetupHook
134           makeMinimal
135           install
136           lorder
137           tsort
138           statHook
139           ;
140       };
142       lorder = self.callPackage ./pkgs/lorder.nix { inherit (buildNetbsd) makeMinimal install; };
144       mtree = self.callPackage ./pkgs/mtree.nix { inherit (self) mknod; };
146       mkDerivation = self.callPackage ./pkgs/mkDerivation.nix {
147         inherit (buildNetbsd)
148           netbsdSetupHook
149           makeMinimal
150           install
151           tsort
152           lorder
153           ;
154         inherit (buildPackages) mandoc;
155         inherit (buildPackages.buildPackages) rsync;
156       };
158       makeMinimal = self.callPackage ./pkgs/makeMinimal.nix { inherit (self) make; };
160       # See note in pkgs/stat/package.nix
161       stat = self.callPackage ./pkgs/stat/package.nix { inherit (buildNetbsd) makeMinimal install; };
163       # See note in pkgs/stat/hook.nix
164       statHook = self.callPackage ./pkgs/stat/hook.nix { inherit (self) stat; };
166       sys-headers = self.callPackage ./pkgs/sys/headers.nix {
167         inherit (buildNetbsd)
168           makeMinimal
169           install
170           tsort
171           lorder
172           statHook
173           uudecode
174           config
175           genassym
176           ;
177       };
179       tsort = self.callPackage ./pkgs/tsort.nix { inherit (buildNetbsd) makeMinimal install; };
180     }
181   );