mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 03:30:45 +00:00
Merge pull request #321382 from NixOS/backport-320840-to-release-24.05
[Backport release-24.05] A few misc BSD related cleanups
This commit is contained in:
commit
5f982a9dd8
|
@ -81,7 +81,7 @@ let
|
|||
&& final.parsed.kernel == platform.parsed.kernel;
|
||||
isCompatible = _: throw "2022-05-23: isCompatible has been removed in favor of canExecute, refer to the 22.11 changelog for details";
|
||||
# Derived meta-data
|
||||
useLLVM = final.isFreeBSD;
|
||||
useLLVM = final.isFreeBSD || final.isOpenBSD;
|
||||
|
||||
libc =
|
||||
/**/ if final.isDarwin then "libSystem"
|
||||
|
|
|
@ -17,15 +17,7 @@ makeScopeWithSplicing' {
|
|||
directory = ./pkgs;
|
||||
}
|
||||
// {
|
||||
|
||||
fetchNetBSD =
|
||||
path: version: sha256:
|
||||
fetchcvs {
|
||||
cvsRoot = ":pserver:anoncvs@anoncvs.NetBSD.org:/cvsroot";
|
||||
module = "src/${path}";
|
||||
inherit sha256;
|
||||
tag = "netbsd-${lib.replaceStrings [ "." ] [ "-" ] version}-RELEASE";
|
||||
};
|
||||
version = "9.2";
|
||||
|
||||
defaultMakeFlags = [
|
||||
"MKSOFTFLOAT=${
|
||||
|
@ -151,18 +143,18 @@ makeScopeWithSplicing' {
|
|||
inherit (buildPackages.buildPackages) rsync;
|
||||
};
|
||||
|
||||
_mainLibcExtraPaths = with self; [
|
||||
common
|
||||
i18n_module.src
|
||||
sys.src
|
||||
ld_elf_so.src
|
||||
libpthread.src
|
||||
libm.src
|
||||
libresolv.src
|
||||
librpcsvc.src
|
||||
libutil.src
|
||||
librt.src
|
||||
libcrypt.src
|
||||
_mainLibcExtraPaths = [
|
||||
"common"
|
||||
"lib/i18n_module"
|
||||
"lib/libcrypt"
|
||||
"lib/libm"
|
||||
"lib/libpthread"
|
||||
"lib/libresolv"
|
||||
"lib/librpcsvc"
|
||||
"lib/librt"
|
||||
"lib/libutil"
|
||||
"libexec/ld.elf_so"
|
||||
"sys"
|
||||
];
|
||||
|
||||
libc = self.callPackage ./pkgs/libc.nix {
|
||||
|
|
|
@ -2,7 +2,5 @@
|
|||
|
||||
mkDerivation {
|
||||
path = "usr.bin/cksum";
|
||||
version = "9.2";
|
||||
sha256 = "0msfhgyvh5c2jmc6qjnf12c378dhw32ffsl864qz4rdb2b98rfcq";
|
||||
meta.platforms = lib.platforms.netbsd;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
{ mkDerivation }:
|
||||
|
||||
mkDerivation {
|
||||
path = "usr.bin/column";
|
||||
version = "9.2";
|
||||
sha256 = "0r6b0hjn5ls3j3sv6chibs44fs32yyk2cg8kh70kb4cwajs4ifyl";
|
||||
}
|
||||
mkDerivation { path = "usr.bin/column"; }
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
{ fetchNetBSD }:
|
||||
|
||||
fetchNetBSD "common" "9.2" "1pfylz9r3ap5wnwwbwczbfjb1m5qdyspzbnmxmcdkpzz2zgj64b9"
|
|
@ -14,19 +14,16 @@
|
|||
netbsdSetupHook,
|
||||
makeMinimal,
|
||||
rsync,
|
||||
fetchNetBSD,
|
||||
_mainLibcExtraPaths,
|
||||
version,
|
||||
}:
|
||||
|
||||
mkDerivation (
|
||||
let
|
||||
version = "9.2";
|
||||
commonDeps = [ zlib ];
|
||||
in
|
||||
{
|
||||
path = "tools/compat";
|
||||
sha256 = "1vsxg7136nlhc72vpa664vs22874xh7ila95nkmsd8crn3z3cyn0";
|
||||
inherit version;
|
||||
|
||||
setupHooks = [
|
||||
../../../../../build-support/setup-hooks/role.bash
|
||||
|
@ -133,14 +130,12 @@ mkDerivation (
|
|||
--subst-var-by version ${version}
|
||||
'';
|
||||
extraPaths = [
|
||||
include.src
|
||||
libc.src
|
||||
libutil.src
|
||||
(fetchNetBSD "external/bsd/flex" "9.2" "0h98jpfj7vx5zh7vd7bk6b1hmzgkcb757a8j6d9zgygxxv13v43m")
|
||||
(fetchNetBSD "sys/sys" "9.2" "0zawhw51klaigqqwkx0lzrx3mim2jywrc24cm7c66qsf1im9awgd")
|
||||
(fetchNetBSD "common/include/rpc/types.h" "9.2"
|
||||
"0n2df12mlc3cbc48jxq35yzl1y7ghgpykvy7jnfh898rdhac7m9a"
|
||||
)
|
||||
include.path
|
||||
libc.path
|
||||
libutil.path
|
||||
"external/bsd/flex"
|
||||
"sys/sys"
|
||||
"common/include/rpc/types.h"
|
||||
] ++ libutil.extraPaths ++ _mainLibcExtraPaths;
|
||||
}
|
||||
)
|
||||
|
|
|
@ -13,8 +13,6 @@
|
|||
}:
|
||||
mkDerivation {
|
||||
path = "usr.bin/config";
|
||||
version = "9.2";
|
||||
sha256 = "1yz3n4hncdkk6kp595fh2q5lg150vpqg8iw2dccydkyw4y3hgsjj";
|
||||
env.NIX_CFLAGS_COMPILE = toString [ "-DMAKE_BOOTSTRAP" ];
|
||||
nativeBuildInputs = [
|
||||
bsdSetupHook
|
||||
|
@ -27,5 +25,5 @@ mkDerivation {
|
|||
rsync
|
||||
];
|
||||
buildInputs = compatIfNeeded;
|
||||
extraPaths = [ cksum.src ];
|
||||
extraPaths = [ cksum.path ];
|
||||
}
|
||||
|
|
|
@ -22,8 +22,6 @@
|
|||
|
||||
mkDerivation {
|
||||
path = "lib/csu";
|
||||
version = "9.2";
|
||||
sha256 = "0al5jfazvhlzn9hvmnrbchx4d0gm282hq5gp4xs2zmj9ycmf6d03";
|
||||
meta.platforms = lib.platforms.netbsd;
|
||||
nativeBuildInputs = [
|
||||
bsdSetupHook
|
||||
|
@ -43,7 +41,7 @@ mkDerivation {
|
|||
];
|
||||
buildInputs = [ headers ];
|
||||
extraPaths = [
|
||||
sys.src
|
||||
ld_elf_so.src
|
||||
sys.path
|
||||
ld_elf_so.path
|
||||
];
|
||||
}
|
||||
|
|
|
@ -3,7 +3,5 @@
|
|||
mkDerivation {
|
||||
path = "share/dict";
|
||||
noCC = true;
|
||||
version = "9.2";
|
||||
sha256 = "0svfc0byk59ri37pyjslv4c4rc7zw396r73mr593i78d39q5g3ad";
|
||||
makeFlags = defaultMakeFlags ++ [ "BINDIR=$(out)/share" ];
|
||||
}
|
||||
|
|
|
@ -4,14 +4,11 @@
|
|||
netbsdSetupHook,
|
||||
rsync,
|
||||
compatIfNeeded,
|
||||
fetchNetBSD,
|
||||
}:
|
||||
|
||||
mkDerivation {
|
||||
pname = "fts";
|
||||
path = "include/fts.h";
|
||||
sha256 = "01d4fpxvz1pgzfk5xznz5dcm0x0gdzwcsfm1h3d0xc9kc6hj2q77";
|
||||
version = "9.2";
|
||||
nativeBuildInputs = [
|
||||
bsdSetupHook
|
||||
netbsdSetupHook
|
||||
|
@ -19,11 +16,9 @@ mkDerivation {
|
|||
];
|
||||
propagatedBuildInputs = compatIfNeeded;
|
||||
extraPaths = [
|
||||
(fetchNetBSD "lib/libc/gen/fts.c" "9.2" "1a8hmf26242nmv05ipn3ircxb0jqmmi66rh78kkyi9vjwkfl3qn7")
|
||||
(fetchNetBSD "lib/libc/include/namespace.h" "9.2"
|
||||
"0kksr3pdwdc1cplqf5z12ih4cml6l11lqrz91f7hjjm64y7785kc"
|
||||
)
|
||||
(fetchNetBSD "lib/libc/gen/fts.3" "9.2" "1asxw0n3fhjdadwkkq3xplfgqgl3q32w1lyrvbakfa3gs0wz5zc1")
|
||||
"lib/libc/gen/fts.c"
|
||||
"lib/libc/include/namespace.h"
|
||||
"lib/libc/gen/fts.3"
|
||||
];
|
||||
skipIncludesPhase = true;
|
||||
buildPhase = ''
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
{ mkDerivation }:
|
||||
|
||||
mkDerivation {
|
||||
path = "usr.bin/genassym";
|
||||
version = "9.2";
|
||||
sha256 = "1acl1dz5kvh9h5806vkz2ap95rdsz7phmynh5i3x5y7agbki030c";
|
||||
}
|
||||
mkDerivation { path = "usr.bin/genassym"; }
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
{ mkDerivation }:
|
||||
|
||||
mkDerivation {
|
||||
path = "usr.bin/gencat";
|
||||
version = "9.2";
|
||||
sha256 = "0gd463x1hg36bhr7y0xryb5jyxk0z0g7xvy8rgk82nlbnlnsbbwb";
|
||||
}
|
||||
mkDerivation { path = "usr.bin/gencat"; }
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
{ mkDerivation }:
|
||||
|
||||
mkDerivation {
|
||||
path = "usr.bin/getconf";
|
||||
sha256 = "122vslz4j3h2mfs921nr2s6m078zcj697yrb75rwp2hnw3qz4s8q";
|
||||
version = "9.2";
|
||||
}
|
||||
mkDerivation { path = "usr.bin/getconf"; }
|
||||
|
|
|
@ -2,7 +2,5 @@
|
|||
|
||||
mkDerivation {
|
||||
path = "usr.bin/getent";
|
||||
sha256 = "1qngywcmm0y7nl8h3n8brvkxq4jw63szbci3kc1q6a6ndhycbbvr";
|
||||
version = "9.2";
|
||||
patches = [ ./getent.patch ];
|
||||
}
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
|
||||
mkDerivation {
|
||||
path = "lib/i18n_module";
|
||||
version = "9.2";
|
||||
sha256 = "0w6y5v3binm7gf2kn7y9jja8k18rhnyl55cvvfnfipjqdxvxd9jd";
|
||||
meta.platforms = lib.platforms.netbsd;
|
||||
extraPaths = [ libc.src ];
|
||||
extraPaths = [ libc.path ];
|
||||
}
|
||||
|
|
|
@ -10,15 +10,12 @@
|
|||
rsync,
|
||||
nbperf,
|
||||
rpcgen,
|
||||
common,
|
||||
defaultMakeFlags,
|
||||
stdenv,
|
||||
}:
|
||||
|
||||
mkDerivation {
|
||||
path = "include";
|
||||
version = "9.2";
|
||||
sha256 = "0nxnmj4c8s3hb9n3fpcmd0zl3l1nmhivqgi9a35sis943qvpgl9h";
|
||||
nativeBuildInputs = [
|
||||
bsdSetupHook
|
||||
netbsdSetupHook
|
||||
|
@ -46,7 +43,7 @@ mkDerivation {
|
|||
makeFlags=''${makeFlags/INCSDIR/INCSDIR0}
|
||||
'';
|
||||
|
||||
extraPaths = [ common ];
|
||||
extraPaths = [ "common" ];
|
||||
headersOnly = true;
|
||||
noCC = true;
|
||||
meta.platforms = lib.platforms.netbsd;
|
||||
|
|
|
@ -26,11 +26,9 @@ let
|
|||
in
|
||||
mkDerivation {
|
||||
path = "usr.bin/xinstall";
|
||||
version = "9.2";
|
||||
sha256 = "1f6pbz3qv1qcrchdxif8p5lbmnwl8b9nq615hsd3cyl4avd5bfqj";
|
||||
extraPaths = [
|
||||
mtree.src
|
||||
make.src
|
||||
mtree.path
|
||||
make.path
|
||||
];
|
||||
nativeBuildInputs = [
|
||||
bsdSetupHook
|
||||
|
|
|
@ -7,8 +7,6 @@
|
|||
|
||||
mkDerivation {
|
||||
path = "libexec/ld.elf_so";
|
||||
version = "9.2";
|
||||
sha256 = "0ia9mqzdljly0vqfwflm5mzz55k7qsr4rw2bzhivky6k30vgirqa";
|
||||
meta.platforms = lib.platforms.netbsd;
|
||||
LIBC_PIC = "${libc}/lib/libc_pic.a";
|
||||
# Hack to prevent a symlink being installed here for compatibility.
|
||||
|
@ -18,5 +16,5 @@ mkDerivation {
|
|||
"BINDIR=$(out)/libexec"
|
||||
"CLIBOBJ=${libc}/lib"
|
||||
];
|
||||
extraPaths = [ libc.src ] ++ libc.extraPaths;
|
||||
extraPaths = [ libc.path ] ++ libc.extraPaths;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,5 @@
|
|||
|
||||
mkDerivation {
|
||||
path = "lib/libarch";
|
||||
version = "9.2";
|
||||
sha256 = "6ssenRhuSwp0Jn71ErT0PrEoCJ+cIYRztwdL4QTDZsQ=";
|
||||
meta.platforms = lib.platforms.netbsd;
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
mkDerivation,
|
||||
defaultMakeFlags,
|
||||
_mainLibcExtraPaths,
|
||||
fetchNetBSD,
|
||||
bsdSetupHook,
|
||||
netbsdSetupHook,
|
||||
makeMinimal,
|
||||
|
@ -26,13 +25,9 @@
|
|||
|
||||
mkDerivation {
|
||||
path = "lib/libc";
|
||||
version = "9.2";
|
||||
sha256 = "1y9c13igg0kai07sqvf9cm6yqmd8lhfd8hq3q7biilbgs1l99as3";
|
||||
USE_FORT = "yes";
|
||||
MKPROFILE = "no";
|
||||
extraPaths = _mainLibcExtraPaths ++ [
|
||||
(fetchNetBSD "external/bsd/jemalloc" "9.2" "0cq704swa0h2yxv4gc79z2lwxibk9k7pxh3q5qfs7axx3jx3n8kb")
|
||||
];
|
||||
extraPaths = _mainLibcExtraPaths ++ [ "external/bsd/jemalloc" ];
|
||||
nativeBuildInputs = [
|
||||
bsdSetupHook
|
||||
netbsdSetupHook
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
mkDerivation {
|
||||
path = "lib/libcrypt";
|
||||
version = "9.2";
|
||||
sha256 = "0siqan1wdqmmhchh2n8w6a8x1abbff8n4yb6jrqxap3hqn8ay54g";
|
||||
SHLIBINSTALLDIR = "$(out)/lib";
|
||||
meta.platforms = lib.platforms.netbsd;
|
||||
}
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
|
||||
mkDerivation {
|
||||
path = "lib/libcurses";
|
||||
version = "9.2";
|
||||
sha256 = "0pd0dggl3w4bv5i5h0s1wrc8hr66n4hkv3zlklarwfdhc692fqal";
|
||||
buildInputs = [ libterminfo ];
|
||||
env.NIX_CFLAGS_COMPILE = toString (
|
||||
[
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
|
||||
mkDerivation {
|
||||
path = "lib/libedit";
|
||||
version = "9.2";
|
||||
sha256 = "1wqhngraxwqk4jgrf5f18jy195yrp7c06n1gf31pbplq79mg1bcj";
|
||||
buildInputs = [
|
||||
libterminfo
|
||||
libcurses
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
|
||||
mkDerivation {
|
||||
path = "lib/libm";
|
||||
version = "9.2";
|
||||
sha256 = "1apwfr26shdmbqqnmg7hxf7bkfxw44ynqnnnghrww9bnhqdnsy92";
|
||||
SHLIBINSTALLDIR = "$(out)/lib";
|
||||
meta.platforms = lib.platforms.netbsd;
|
||||
extraPaths = [ sys.src ];
|
||||
extraPaths = [ sys.path ];
|
||||
}
|
||||
|
|
|
@ -2,7 +2,5 @@
|
|||
|
||||
mkDerivation {
|
||||
path = "lib/libossaudio";
|
||||
version = "9.2";
|
||||
sha256 = "16l3bfy6dcwqnklvh3x0ps8ld1y504vf57v9rx8f9adzhb797jh0";
|
||||
meta.platforms = lib.platforms.netbsd;
|
||||
}
|
||||
|
|
|
@ -7,9 +7,7 @@
|
|||
mkDerivation {
|
||||
pname = "libpci";
|
||||
path = "lib/libpci";
|
||||
version = "9.2";
|
||||
sha256 = "+IOEO1Bw3/H3iCp3uk3bwsFZbvCqN5Ciz70irnPl8E8=";
|
||||
env.NIX_CFLAGS_COMPILE = toString [ "-I." ];
|
||||
meta.platforms = lib.platforms.netbsd;
|
||||
extraPaths = [ sys.src ];
|
||||
extraPaths = [ sys.path ];
|
||||
}
|
||||
|
|
|
@ -1,5 +1 @@
|
|||
{
|
||||
path = "lib/libpthread";
|
||||
version = "9.2";
|
||||
sha256 = "0mlmc31k509dwfmx5s2x010wxjc44mr6y0cbmk30cfipqh8c962h";
|
||||
}
|
||||
{ path = "lib/libpthread"; }
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
lib,
|
||||
mkDerivation,
|
||||
headers,
|
||||
common,
|
||||
libc,
|
||||
librt,
|
||||
sys,
|
||||
|
@ -18,10 +17,10 @@ mkDerivation (
|
|||
buildInputs = [ headers ];
|
||||
SHLIBINSTALLDIR = "$(out)/lib";
|
||||
extraPaths = [
|
||||
common
|
||||
libc.src
|
||||
librt.src
|
||||
sys.src
|
||||
"common"
|
||||
libc.path
|
||||
librt.path
|
||||
sys.path
|
||||
];
|
||||
meta.platforms = lib.platforms.netbsd;
|
||||
}
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
|
||||
mkDerivation {
|
||||
path = "lib/libresolv";
|
||||
version = "9.2";
|
||||
sha256 = "1am74s74mf1ynwz3p4ncjkg63f78a1zjm983q166x4sgzps15626";
|
||||
meta.platforms = lib.platforms.netbsd;
|
||||
extraPaths = [ libc.src ];
|
||||
extraPaths = [ libc.path ];
|
||||
}
|
||||
|
|
|
@ -14,8 +14,6 @@
|
|||
|
||||
mkDerivation {
|
||||
path = "lib/librpcsvc";
|
||||
version = "9.2";
|
||||
sha256 = "1q34pfiyjbrgrdqm46jwrsqms49ly6z3b0xh1wg331zga900vq5n";
|
||||
makeFlags = defaultMakeFlags ++ [ "INCSDIR=$(out)/include/rpcsvc" ];
|
||||
meta.platforms = lib.platforms.netbsd;
|
||||
nativeBuildInputs = [
|
||||
|
|
|
@ -7,10 +7,8 @@
|
|||
|
||||
mkDerivation {
|
||||
path = "lib/librt";
|
||||
version = "9.2";
|
||||
sha256 = "07f8mpjcqh5kig5z5sp97fg55mc4dz6aa1x5g01nv2pvbmqczxc6";
|
||||
meta.platforms = lib.platforms.netbsd;
|
||||
extraPaths = [ libc.src ] ++ libc.extraPaths;
|
||||
extraPaths = [ libc.path ] ++ libc.extraPaths;
|
||||
postPatch = ''
|
||||
sed -i 's,/usr\(/include/sys/syscall.h\),${headers}\1,g' \
|
||||
$BSDSRCDIR/lib/{libc,librt}/sys/Makefile.inc
|
||||
|
|
|
@ -12,13 +12,10 @@
|
|||
tic,
|
||||
rsync,
|
||||
compatIfNeeded,
|
||||
fetchNetBSD,
|
||||
}:
|
||||
|
||||
mkDerivation {
|
||||
path = "lib/libterminfo";
|
||||
version = "9.2";
|
||||
sha256 = "0pq05k3dj0dfsczv07frnnji92mazmy2qqngqbx2zgqc1x251414";
|
||||
nativeBuildInputs = [
|
||||
bsdSetupHook
|
||||
netbsdSetupHook
|
||||
|
@ -45,7 +42,5 @@ mkDerivation {
|
|||
postInstall = ''
|
||||
make -C $BSDSRCDIR/share/terminfo $makeFlags BINDIR=$out/share install
|
||||
'';
|
||||
extraPaths = [
|
||||
(fetchNetBSD "share/terminfo" "9.2" "1vh9rl4w8118a9qdpblfxmv1wkpm83rm9gb4rzz5bpm56i6d7kk7")
|
||||
];
|
||||
extraPaths = [ "share/terminfo" ];
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
mkDerivation,
|
||||
common,
|
||||
libc,
|
||||
sys,
|
||||
bsdSetupHook,
|
||||
|
@ -18,12 +17,10 @@
|
|||
|
||||
mkDerivation {
|
||||
path = "lib/libutil";
|
||||
version = "9.2";
|
||||
sha256 = "02gm5a5zhh8qp5r5q5r7x8x6x50ir1i0ncgsnfwh1vnrz6mxbq7z";
|
||||
extraPaths = [
|
||||
common
|
||||
libc.src
|
||||
sys.src
|
||||
"common"
|
||||
libc.path
|
||||
sys.path
|
||||
];
|
||||
nativeBuildInputs = [
|
||||
bsdSetupHook
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
mkDerivation {
|
||||
path = "usr.bin/locale";
|
||||
version = "9.2";
|
||||
sha256 = "0kk6v9k2bygq0wf9gbinliqzqpzs9bgxn0ndyl2wcv3hh2bmsr9p";
|
||||
patches = [ ./locale.patch ];
|
||||
env.NIX_CFLAGS_COMPILE = "-DYESSTR=__YESSTR -DNOSTR=__NOSTR";
|
||||
}
|
||||
|
|
|
@ -11,8 +11,6 @@
|
|||
|
||||
mkDerivation {
|
||||
path = "usr.bin/lorder";
|
||||
version = "9.2";
|
||||
sha256 = "0rjf9blihhm0n699vr2bg88m4yjhkbxh6fxliaay3wxkgnydjwn2";
|
||||
nativeBuildInputs = [
|
||||
bsdSetupHook
|
||||
netbsdSetupHook
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
{
|
||||
lib,
|
||||
mkDerivation,
|
||||
fetchNetBSD,
|
||||
stdenv,
|
||||
bsdSetupHook,
|
||||
netbsdSetupHook,
|
||||
|
@ -10,8 +9,6 @@
|
|||
|
||||
mkDerivation {
|
||||
path = "share/mk";
|
||||
sha256 = "0w9x77cfnm6zwy40slradzi0ip9gz80x6lk7pvnlxzsr2m5ra5sy";
|
||||
version = "9.2";
|
||||
noCC = true;
|
||||
|
||||
buildInputs = [ ];
|
||||
|
|
|
@ -1,15 +1,12 @@
|
|||
{
|
||||
lib,
|
||||
mkDerivation,
|
||||
fetchNetBSD,
|
||||
stdenv,
|
||||
make-rules,
|
||||
}:
|
||||
|
||||
mkDerivation {
|
||||
path = "usr.bin/make";
|
||||
sha256 = "0vi73yicbmbp522qzqvd979cx6zm5jakhy77xh73c1kygf8klccs";
|
||||
version = "9.2";
|
||||
|
||||
postPatch =
|
||||
make-rules.postPatch
|
||||
|
@ -21,7 +18,5 @@ mkDerivation {
|
|||
postInstall = ''
|
||||
make -C $BSDSRCDIR/share/mk FILESDIR=$out/share/mk install
|
||||
'';
|
||||
extraPaths = [
|
||||
(fetchNetBSD "share/mk" "9.2" "0w9x77cfnm6zwy40slradzi0ip9gz80x6lk7pvnlxzsr2m5ra5sy")
|
||||
];
|
||||
extraPaths = [ "share/mk" ];
|
||||
}
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
|
||||
mkDerivation {
|
||||
path = "tools/make";
|
||||
sha256 = "0fh0nrnk18m613m5blrliq2aydciv51qhc0ihsj4k63incwbk90n";
|
||||
version = "9.2";
|
||||
|
||||
buildInputs = [ ];
|
||||
nativeBuildInputs = [
|
||||
|
@ -47,5 +45,5 @@ mkDerivation {
|
|||
runHook postInstall
|
||||
'';
|
||||
|
||||
extraPaths = [ make.src ];
|
||||
extraPaths = [ make.path ];
|
||||
}
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
mkDerivation {
|
||||
path = "share/man";
|
||||
noCC = true;
|
||||
version = "9.2";
|
||||
sha256 = "1l4lmj4kmg8dl86x94sr45w0xdnkz8dn4zjx0ipgr9bnq98663zl";
|
||||
# man0 generates a man.pdf using ps2pdf, but doesn't install it later,
|
||||
# so we can avoid the dependency on ghostscript
|
||||
postPatch = ''
|
||||
|
|
|
@ -3,7 +3,5 @@
|
|||
mkDerivation {
|
||||
path = "share/misc";
|
||||
noCC = true;
|
||||
version = "9.2";
|
||||
sha256 = "1j2cdssdx6nncv8ffj7f7ybl7m9hadjj8vm8611skqdvxnjg6nbc";
|
||||
makeFlags = defaultMakeFlags ++ [ "BINDIR=$(out)/share" ];
|
||||
}
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
{
|
||||
lib,
|
||||
stdenvNoCC,
|
||||
stdenv,
|
||||
fetchNetBSD,
|
||||
stdenvNoCC,
|
||||
crossLibcStdenv,
|
||||
runCommand,
|
||||
rsync,
|
||||
source,
|
||||
bsdSetupHook,
|
||||
netbsdSetupHook,
|
||||
makeMinimal,
|
||||
|
@ -12,9 +15,9 @@
|
|||
mandoc,
|
||||
groff,
|
||||
statHook,
|
||||
rsync,
|
||||
compatIfNeeded,
|
||||
defaultMakeFlags,
|
||||
version,
|
||||
}:
|
||||
|
||||
lib.makeOverridable (
|
||||
|
@ -23,10 +26,20 @@ lib.makeOverridable (
|
|||
stdenv' = if attrs.noCC or false then stdenvNoCC else stdenv;
|
||||
in
|
||||
stdenv'.mkDerivation (
|
||||
{
|
||||
rec {
|
||||
pname = "${attrs.pname or (baseNameOf attrs.path)}-netbsd";
|
||||
inherit (attrs) version;
|
||||
src = fetchNetBSD attrs.path attrs.version attrs.sha256;
|
||||
inherit version;
|
||||
src = runCommand "${pname}-filtered-src" { nativeBuildInputs = [ rsync ]; } ''
|
||||
for p in ${lib.concatStringsSep " " ([ attrs.path ] ++ attrs.extraPaths or [ ])}; do
|
||||
set -x
|
||||
path="$out/$p"
|
||||
mkdir -p "$(dirname "$path")"
|
||||
src_path="${source}/$p"
|
||||
if [[ -d "$src_path" ]]; then src_path+=/; fi
|
||||
rsync --chmod="+w" -r "$src_path" "$path"
|
||||
set +x
|
||||
done
|
||||
'';
|
||||
|
||||
extraPaths = [ ];
|
||||
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
{ mkDerivation }:
|
||||
|
||||
mkDerivation {
|
||||
path = "sbin/mknod";
|
||||
version = "9.2";
|
||||
sha256 = "1d9369shzwgixz3nph991i8q5vk7hr04py3n9avbfbhzy4gndqs2";
|
||||
}
|
||||
mkDerivation { path = "sbin/mknod"; }
|
||||
|
|
|
@ -2,7 +2,5 @@
|
|||
|
||||
mkDerivation {
|
||||
path = "usr.sbin/mtree";
|
||||
version = "9.2";
|
||||
sha256 = "04p7w540vz9npvyb8g8hcf2xa05phn1y88hsyrcz3vwanvpc0yv9";
|
||||
extraPaths = [ mknod.src ];
|
||||
extraPaths = [ mknod.path ];
|
||||
}
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
{ mkDerivation }:
|
||||
|
||||
mkDerivation {
|
||||
path = "usr.bin/nbperf";
|
||||
version = "9.2";
|
||||
sha256 = "1nxc302vgmjhm3yqdivqyfzslrg0vjpbss44s74rcryrl19mma9r";
|
||||
}
|
||||
mkDerivation { path = "usr.bin/nbperf"; }
|
||||
|
|
|
@ -1,16 +1,6 @@
|
|||
mergeNetBSDSourceDir() {
|
||||
# merge together all extra paths
|
||||
# there should be a better way to do this
|
||||
chmod -R u+w $BSDSRCDIR
|
||||
for path in $extraPaths; do
|
||||
rsync -Er --chmod u+w $path/ $BSDSRCDIR/
|
||||
done
|
||||
}
|
||||
|
||||
addNetBSDMakeFlags() {
|
||||
makeFlags="INCSDIR=${!outputDev}/include $makeFlags"
|
||||
makeFlags="MANDIR=${!outputMan}/share/man $makeFlags"
|
||||
}
|
||||
|
||||
postUnpackHooks+=(mergeNetBSDSourceDir)
|
||||
preConfigureHooks+=(addNetBSDMakeFlags)
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
{ mkDerivation }:
|
||||
|
||||
mkDerivation {
|
||||
path = "usr.bin/rpcgen";
|
||||
version = "9.2";
|
||||
sha256 = "1kfgfx54jg98wbg0d95p0rvf4w0302v8fz724b0bdackdsrd4988";
|
||||
}
|
||||
mkDerivation { path = "usr.bin/rpcgen"; }
|
||||
|
|
12
pkgs/os-specific/bsd/netbsd/pkgs/source.nix
Normal file
12
pkgs/os-specific/bsd/netbsd/pkgs/source.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
lib,
|
||||
fetchcvs,
|
||||
version,
|
||||
}:
|
||||
|
||||
fetchcvs {
|
||||
cvsRoot = ":pserver:anoncvs@anoncvs.NetBSD.org:/cvsroot";
|
||||
module = "src";
|
||||
tag = "netbsd-${lib.replaceStrings [ "." ] [ "-" ] version}-RELEASE";
|
||||
sha256 = "sha256-+onT/ajWayaKALucaZBqoiEkvBBI400Fs2OCtMf/bYU=";
|
||||
}
|
|
@ -14,8 +14,6 @@
|
|||
|
||||
mkDerivation {
|
||||
path = "usr.bin/stat";
|
||||
version = "9.2";
|
||||
sha256 = "18nqwlndfc34qbbgqx5nffil37jfq9aw663ippasfxd2hlyc106x";
|
||||
nativeBuildInputs = [
|
||||
bsdSetupHook
|
||||
netbsdSetupHook
|
||||
|
|
|
@ -14,12 +14,9 @@
|
|||
config,
|
||||
genassym,
|
||||
defaultMakeFlags,
|
||||
common,
|
||||
}:
|
||||
{
|
||||
path = "sys";
|
||||
version = "9.2";
|
||||
sha256 = "03s18q8d9giipf05bx199fajc2qwikji0djz7hw63d2lya6bfnpj";
|
||||
|
||||
# Make the build ignore linker warnings
|
||||
prePatch = ''
|
||||
|
@ -89,5 +86,5 @@
|
|||
'';
|
||||
|
||||
meta.platforms = lib.platforms.netbsd;
|
||||
extraPaths = [ common ];
|
||||
extraPaths = [ "common" ];
|
||||
}
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
config,
|
||||
genassym,
|
||||
defaultMakeFlags,
|
||||
common,
|
||||
}:
|
||||
let
|
||||
base = import ./base.nix {
|
||||
|
@ -34,7 +33,6 @@ let
|
|||
config
|
||||
genassym
|
||||
defaultMakeFlags
|
||||
common
|
||||
;
|
||||
};
|
||||
in
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
config,
|
||||
genassym,
|
||||
defaultMakeFlags,
|
||||
common,
|
||||
}:
|
||||
let
|
||||
base = import ./base.nix {
|
||||
|
@ -34,7 +33,6 @@ let
|
|||
config
|
||||
genassym
|
||||
defaultMakeFlags
|
||||
common
|
||||
;
|
||||
};
|
||||
in
|
||||
|
|
|
@ -11,13 +11,10 @@
|
|||
compatIfNeeded,
|
||||
defaultMakeFlags,
|
||||
libterminfo,
|
||||
fetchNetBSD,
|
||||
}:
|
||||
|
||||
mkDerivation {
|
||||
path = "tools/tic";
|
||||
version = "9.2";
|
||||
sha256 = "092y7db7k4kh2jq8qc55126r5qqvlb8lq8mhmy5ipbi36hwb4zrz";
|
||||
HOSTPROG = "tic";
|
||||
buildInputs = compatIfNeeded;
|
||||
nativeBuildInputs = [
|
||||
|
@ -32,8 +29,8 @@ mkDerivation {
|
|||
];
|
||||
makeFlags = defaultMakeFlags ++ [ "TOOLDIR=$(out)" ];
|
||||
extraPaths = [
|
||||
libterminfo.src
|
||||
(fetchNetBSD "usr.bin/tic" "9.2" "1mwdfg7yx1g43ss378qsgl5rqhsxskqvsd2mqvrn38qw54i8v5i1")
|
||||
(fetchNetBSD "tools/Makefile.host" "9.2" "15b4ab0n36lqj00j5lz2xs83g7l8isk3wx1wcapbrn66qmzz2sxy")
|
||||
libterminfo.path
|
||||
"usr.bin/tic"
|
||||
"tools/Makefile.host"
|
||||
];
|
||||
}
|
||||
|
|
|
@ -11,8 +11,6 @@
|
|||
|
||||
mkDerivation {
|
||||
path = "usr.bin/tsort";
|
||||
version = "9.2";
|
||||
sha256 = "1dqvf9gin29nnq3c4byxc7lfd062pg7m84843zdy6n0z63hnnwiq";
|
||||
nativeBuildInputs = [
|
||||
bsdSetupHook
|
||||
netbsdSetupHook
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
|
||||
mkDerivation {
|
||||
path = "usr.bin/uudecode";
|
||||
version = "9.2";
|
||||
sha256 = "00a3zmh15pg4vx6hz0kaa5mi8d2b1sj4h512d7p6wbvxq6mznwcn";
|
||||
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isLinux "-DNO_BASE64";
|
||||
NIX_LDFLAGS = lib.optional stdenv.isDarwin "-lresolv";
|
||||
}
|
||||
|
|
|
@ -258,6 +258,7 @@ in
|
|||
|
||||
x86_64-freebsd = mapTestOnCross systems.examples.x86_64-freebsd common;
|
||||
x86_64-netbsd = mapTestOnCross systems.examples.x86_64-netbsd common;
|
||||
x86_64-openbsd = mapTestOnCross systems.examples.x86_64-openbsd common;
|
||||
|
||||
# we test `embedded` instead of `linuxCommon` because very few packages
|
||||
# successfully cross-compile to Redox so far
|
||||
|
|
Loading…
Reference in a new issue