at master 90 lines 2.5 kB view raw
1{ 2 lib, 3 stdenvNoLibc, 4 makeScopeWithSplicing', 5 generateSplicesForMkScope, 6 buildPackages, 7}: 8 9let 10 otherSplices = generateSplicesForMkScope "openbsd"; 11 buildOpenbsd = otherSplices.selfBuildHost; 12in 13 14makeScopeWithSplicing' { 15 inherit otherSplices; 16 f = ( 17 self: 18 lib.packagesFromDirectoryRecursive { 19 callPackage = self.callPackage; 20 directory = ./pkgs; 21 } 22 // { 23 version = "7.5"; 24 25 stdenvLibcMinimal = stdenvNoLibc.override (old: { 26 cc = old.cc.override { 27 libc = self.libcMinimal; 28 noLibc = false; 29 bintools = old.cc.bintools.override { 30 libc = self.libcMinimal; 31 noLibc = false; 32 sharedLibraryLoader = null; 33 }; 34 }; 35 }); 36 37 makeMinimal = buildPackages.netbsd.makeMinimal.override { inherit (self) make-rules; }; 38 39 # The manual callPackages below should in principle be unnecessary, but are 40 # necessary. See note in ../netbsd/default.nix 41 42 include = self.callPackage ./pkgs/include/package.nix { 43 inherit (buildOpenbsd) makeMinimal; 44 inherit (buildPackages.netbsd) install rpcgen mtree; 45 }; 46 47 csu = self.callPackage ./pkgs/csu.nix { 48 inherit (self) include; 49 inherit (buildOpenbsd) makeMinimal; 50 inherit (buildPackages.netbsd) install; 51 }; 52 53 libcMinimal = self.callPackage ./pkgs/libcMinimal/package.nix { 54 inherit (self) csu include; 55 inherit (buildOpenbsd) makeMinimal; 56 inherit (buildPackages.netbsd) 57 install 58 gencat 59 tsort 60 rpcgen 61 ; 62 }; 63 64 librpcsvc = self.callPackage ./pkgs/librpcsvc.nix { 65 inherit (buildOpenbsd) openbsdSetupHook makeMinimal lorder; 66 inherit (buildPackages.netbsd) 67 install 68 tsort 69 statHook 70 rpcgen 71 ; 72 }; 73 74 libutil = self.callPackage ./pkgs/libutil.nix { 75 inherit (self) libcMinimal; 76 inherit (buildOpenbsd) openbsdSetupHook makeMinimal lorder; 77 inherit (buildPackages.netbsd) install tsort statHook; 78 }; 79 80 lorder = self.callPackage ./pkgs/lorder.nix { inherit (buildPackages.netbsd) install; }; 81 82 make-rules = self.callPackage ./pkgs/make-rules/package.nix { }; 83 84 mkDerivation = self.callPackage ./pkgs/mkDerivation.nix { 85 inherit (buildPackages.netbsd) install tsort; 86 inherit (buildPackages.buildPackages) rsync; 87 }; 88 } 89 ); 90}