2024-04-30 23:29:38 +00:00
|
|
|
{
|
|
|
|
stdenv,
|
|
|
|
lib,
|
|
|
|
stdenvNoCC,
|
|
|
|
fetchzip,
|
2024-05-01 16:37:04 +00:00
|
|
|
sourceData,
|
|
|
|
versionData,
|
|
|
|
buildFreebsd,
|
|
|
|
patchesRoot,
|
2024-06-07 14:50:41 +00:00
|
|
|
writeText,
|
2024-04-30 23:29:38 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
self:
|
|
|
|
|
|
|
|
lib.packagesFromDirectoryRecursive {
|
|
|
|
callPackage = self.callPackage;
|
|
|
|
directory = ./pkgs;
|
|
|
|
}
|
|
|
|
// {
|
2024-05-01 16:37:04 +00:00
|
|
|
inherit sourceData patchesRoot versionData;
|
2024-05-20 12:00:20 +00:00
|
|
|
patches = ./patches + "/${self.versionData.revision}";
|
2024-04-30 23:29:38 +00:00
|
|
|
|
|
|
|
# Keep the crawled portion of Nixpkgs finite.
|
|
|
|
buildFreebsd = lib.dontRecurseIntoAttrs buildFreebsd;
|
|
|
|
|
|
|
|
ports = fetchzip {
|
|
|
|
url = "https://cgit.freebsd.org/ports/snapshot/ports-dde3b2b456c3a4bdd217d0bf3684231cc3724a0a.tar.gz";
|
|
|
|
sha256 = "BpHqJfnGOeTE7tkFJBx0Wk8ryalmf4KNTit/Coh026E=";
|
|
|
|
};
|
|
|
|
|
2024-04-27 02:22:23 +00:00
|
|
|
compatIsNeeded = !stdenvNoCC.hostPlatform.isFreeBSD;
|
|
|
|
compatIfNeeded = lib.optional self.compatIsNeeded self.compat;
|
2024-04-30 23:29:38 +00:00
|
|
|
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
|
|
|
|
]
|
2024-05-06 14:41:14 +00:00
|
|
|
)
|
2024-04-30 23:29:38 +00:00
|
|
|
);
|
2024-06-07 14:50:41 +00:00
|
|
|
inherit lib writeText;
|
2024-04-30 23:29:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# 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;
|
2024-04-27 02:22:23 +00:00
|
|
|
inherit (buildFreebsd) makeMinimal;
|
2024-04-30 23:29:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
csu = self.callPackage ./pkgs/csu.nix {
|
|
|
|
inherit (buildFreebsd) makeMinimal install gencat;
|
|
|
|
inherit (self) include;
|
|
|
|
};
|
|
|
|
|
2024-04-27 02:22:23 +00:00
|
|
|
include = self.callPackage ./pkgs/include/package.nix { inherit (buildFreebsd) rpcgen mtree; };
|
2024-04-30 23:29:38 +00:00
|
|
|
|
|
|
|
install = self.callPackage ./pkgs/install.nix {
|
|
|
|
inherit (buildFreebsd) makeMinimal;
|
2024-04-27 02:22:23 +00:00
|
|
|
inherit (self) libmd libnetbsd;
|
2024-04-30 23:29:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
libc = self.callPackage ./pkgs/libc/package.nix {
|
|
|
|
inherit (buildFreebsd)
|
|
|
|
makeMinimal
|
|
|
|
install
|
|
|
|
gencat
|
|
|
|
rpcgen
|
2024-04-27 02:22:23 +00:00
|
|
|
mkcsmapper
|
|
|
|
mkesdb
|
2024-04-30 23:29:38 +00:00
|
|
|
;
|
|
|
|
inherit (self) csu include;
|
|
|
|
};
|
|
|
|
|
|
|
|
libnetbsd = self.callPackage ./pkgs/libnetbsd/package.nix { inherit (buildFreebsd) makeMinimal; };
|
|
|
|
|
2024-04-27 02:22:23 +00:00
|
|
|
libmd = self.callPackage ./pkgs/libmd.nix { inherit (buildFreebsd) makeMinimal; };
|
|
|
|
|
2024-04-30 23:29:38 +00:00
|
|
|
mkDerivation = self.callPackage ./pkgs/mkDerivation.nix {
|
|
|
|
inherit stdenv;
|
2024-04-27 02:22:23 +00:00
|
|
|
inherit (buildFreebsd)
|
|
|
|
freebsdSetupHook
|
|
|
|
makeMinimal
|
|
|
|
install
|
|
|
|
tsort
|
|
|
|
lorder
|
|
|
|
;
|
2024-04-30 23:29:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
makeMinimal = self.callPackage ./pkgs/makeMinimal.nix { inherit (self) make; };
|
2024-04-27 02:22:23 +00:00
|
|
|
|
|
|
|
mtree = self.callPackage ./pkgs/mtree.nix { inherit (self) libnetbsd libmd; };
|
|
|
|
|
|
|
|
tsort = self.callPackage ./pkgs/tsort.nix { inherit (buildFreebsd) makeMinimal install; };
|
2024-04-30 23:29:38 +00:00
|
|
|
}
|