depot/third_party/nixpkgs/pkgs/os-specific/bsd/openbsd/default.nix
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

90 lines
2.4 KiB
Nix

{
lib,
stdenvNoLibc,
makeScopeWithSplicing',
generateSplicesForMkScope,
buildPackages,
}:
let
otherSplices = generateSplicesForMkScope "openbsd";
buildOpenbsd = otherSplices.selfBuildHost;
in
makeScopeWithSplicing' {
inherit otherSplices;
f = (
self:
lib.packagesFromDirectoryRecursive {
callPackage = self.callPackage;
directory = ./pkgs;
}
// {
version = "7.5";
stdenvLibcMinimal = stdenvNoLibc.override (old: {
cc = old.cc.override {
libc = self.libcMinimal;
noLibc = false;
bintools = old.cc.bintools.override {
libc = self.libcMinimal;
noLibc = false;
sharedLibraryLoader = null;
};
};
});
makeMinimal = buildPackages.netbsd.makeMinimal.override { inherit (self) make-rules; };
# The manual callPackages below should in principle be unnecessary, but are
# necessary. See note in ../netbsd/default.nix
include = self.callPackage ./pkgs/include/package.nix {
inherit (buildOpenbsd) makeMinimal;
inherit (buildPackages.netbsd) install rpcgen mtree;
};
csu = self.callPackage ./pkgs/csu.nix {
inherit (self) include;
inherit (buildOpenbsd) makeMinimal;
inherit (buildPackages.netbsd) install;
};
libcMinimal = self.callPackage ./pkgs/libcMinimal/package.nix {
inherit (self) csu include;
inherit (buildOpenbsd) makeMinimal;
inherit (buildPackages.netbsd)
install
gencat
tsort
rpcgen
;
};
librpcsvc = self.callPackage ./pkgs/librpcsvc.nix {
inherit (buildOpenbsd) openbsdSetupHook makeMinimal lorder;
inherit (buildPackages.netbsd)
install
tsort
statHook
rpcgen
;
};
libutil = self.callPackage ./pkgs/libutil.nix {
inherit (self) libcMinimal;
inherit (buildOpenbsd) openbsdSetupHook makeMinimal lorder;
inherit (buildPackages.netbsd) install tsort statHook;
};
lorder = self.callPackage ./pkgs/lorder.nix { inherit (buildPackages.netbsd) install; };
make-rules = self.callPackage ./pkgs/make-rules/package.nix { };
mkDerivation = self.callPackage ./pkgs/mkDerivation.nix {
inherit (buildPackages.netbsd) install tsort;
inherit (buildPackages.buildPackages) rsync;
};
}
);
}