Merge pull request #321622 from obsidiansystems/netbsd-cleanup
netbsd: A few small cleanups
This commit is contained in:
@@ -8,8 +8,13 @@
|
||||
fetchcvs,
|
||||
}:
|
||||
|
||||
makeScopeWithSplicing' {
|
||||
let
|
||||
otherSplices = generateSplicesForMkScope "netbsd";
|
||||
buildNetbsd = otherSplices.selfBuildHost;
|
||||
in
|
||||
|
||||
makeScopeWithSplicing' {
|
||||
inherit otherSplices;
|
||||
f = (
|
||||
self:
|
||||
lib.packagesFromDirectoryRecursive {
|
||||
@@ -47,8 +52,98 @@ makeScopeWithSplicing' {
|
||||
# if we don't perform these manual calls, we get infinite recursion issues
|
||||
# because of the splices.
|
||||
|
||||
compat = self.callPackage ./pkgs/compat/package.nix {
|
||||
inherit (buildPackages) coreutils;
|
||||
inherit (buildPackages.darwin) cctools-port;
|
||||
inherit (buildNetbsd) makeMinimal;
|
||||
inherit (self) install;
|
||||
};
|
||||
|
||||
config = self.callPackage ./pkgs/config.nix {
|
||||
inherit (buildNetbsd) makeMinimal install;
|
||||
inherit (self) cksum;
|
||||
};
|
||||
|
||||
csu = self.callPackage ./pkgs/csu.nix {
|
||||
inherit (self) headers sys-headers ld_elf_so;
|
||||
inherit (buildNetbsd)
|
||||
netbsdSetupHook
|
||||
makeMinimal
|
||||
install
|
||||
genassym
|
||||
gencat
|
||||
lorder
|
||||
tsort
|
||||
statHook
|
||||
;
|
||||
};
|
||||
|
||||
include = self.callPackage ./pkgs/include.nix {
|
||||
inherit (buildNetbsd)
|
||||
makeMinimal
|
||||
install
|
||||
nbperf
|
||||
rpcgen
|
||||
;
|
||||
inherit (buildPackages) stdenv;
|
||||
};
|
||||
|
||||
install = self.callPackage ./pkgs/install/package.nix {
|
||||
inherit (self)
|
||||
fts
|
||||
mtree
|
||||
make
|
||||
compatIfNeeded
|
||||
;
|
||||
inherit (buildNetbsd) makeMinimal;
|
||||
};
|
||||
|
||||
libcMinimal = self.callPackage ./pkgs/libcMinimal.nix {
|
||||
inherit (self) headers csu;
|
||||
inherit (buildNetbsd)
|
||||
netbsdSetupHook
|
||||
makeMinimal
|
||||
install
|
||||
genassym
|
||||
gencat
|
||||
lorder
|
||||
tsort
|
||||
statHook
|
||||
rpcgen
|
||||
;
|
||||
};
|
||||
|
||||
libpthread-headers = self.callPackage ./pkgs/libpthread/headers.nix { };
|
||||
|
||||
librpcsvc = self.callPackage ./pkgs/librpcsvc.nix {
|
||||
inherit (buildNetbsd)
|
||||
netbsdSetupHook
|
||||
makeMinimal
|
||||
install
|
||||
lorder
|
||||
tsort
|
||||
statHook
|
||||
rpcgen
|
||||
;
|
||||
};
|
||||
|
||||
libutil = self.callPackage ./pkgs/libutil.nix {
|
||||
inherit (buildNetbsd)
|
||||
netbsdSetupHook
|
||||
makeMinimal
|
||||
install
|
||||
lorder
|
||||
tsort
|
||||
statHook
|
||||
;
|
||||
};
|
||||
|
||||
lorder = self.callPackage ./pkgs/lorder.nix { inherit (buildNetbsd) makeMinimal install; };
|
||||
|
||||
mtree = self.callPackage ./pkgs/mtree.nix { inherit (self) mknod; };
|
||||
|
||||
mkDerivation = self.callPackage ./pkgs/mkDerivation.nix {
|
||||
inherit (buildPackages.netbsd)
|
||||
inherit (buildNetbsd)
|
||||
netbsdSetupHook
|
||||
makeMinimal
|
||||
install
|
||||
@@ -61,52 +156,14 @@ makeScopeWithSplicing' {
|
||||
|
||||
makeMinimal = self.callPackage ./pkgs/makeMinimal.nix { inherit (self) make; };
|
||||
|
||||
compat = self.callPackage ./pkgs/compat/package.nix {
|
||||
inherit (buildPackages) coreutils;
|
||||
inherit (buildPackages.darwin) cctools-port;
|
||||
inherit (buildPackages.netbsd) makeMinimal;
|
||||
inherit (self) install;
|
||||
};
|
||||
|
||||
install = self.callPackage ./pkgs/install/package.nix {
|
||||
inherit (self)
|
||||
fts
|
||||
mtree
|
||||
make
|
||||
compatIfNeeded
|
||||
;
|
||||
inherit (buildPackages.netbsd) makeMinimal;
|
||||
};
|
||||
|
||||
# See note in pkgs/stat/package.nix
|
||||
stat = self.callPackage ./pkgs/stat/package.nix {
|
||||
inherit (buildPackages.netbsd) makeMinimal install;
|
||||
};
|
||||
stat = self.callPackage ./pkgs/stat/package.nix { inherit (buildNetbsd) makeMinimal install; };
|
||||
|
||||
# See note in pkgs/stat/hook.nix
|
||||
statHook = self.callPackage ./pkgs/stat/hook.nix { inherit (self) stat; };
|
||||
|
||||
tsort = self.callPackage ./pkgs/tsort.nix { inherit (buildPackages.netbsd) makeMinimal install; };
|
||||
|
||||
lorder = self.callPackage ./pkgs/lorder.nix { inherit (buildPackages.netbsd) makeMinimal install; };
|
||||
|
||||
config = self.callPackage ./pkgs/config.nix {
|
||||
inherit (buildPackages.netbsd) makeMinimal install;
|
||||
inherit (self) cksum;
|
||||
};
|
||||
|
||||
include = self.callPackage ./pkgs/include.nix {
|
||||
inherit (buildPackages.netbsd)
|
||||
makeMinimal
|
||||
install
|
||||
nbperf
|
||||
rpcgen
|
||||
;
|
||||
inherit (buildPackages) stdenv;
|
||||
};
|
||||
|
||||
sys-headers = self.callPackage ./pkgs/sys/headers.nix {
|
||||
inherit (buildPackages.netbsd)
|
||||
inherit (buildNetbsd)
|
||||
makeMinimal
|
||||
install
|
||||
tsort
|
||||
@@ -118,61 +175,7 @@ makeScopeWithSplicing' {
|
||||
;
|
||||
};
|
||||
|
||||
libutil = self.callPackage ./pkgs/libutil.nix {
|
||||
inherit (buildPackages.netbsd)
|
||||
netbsdSetupHook
|
||||
makeMinimal
|
||||
install
|
||||
lorder
|
||||
tsort
|
||||
statHook
|
||||
;
|
||||
};
|
||||
|
||||
libpthread-headers = self.callPackage ./pkgs/libpthread/headers.nix { };
|
||||
|
||||
csu = self.callPackage ./pkgs/csu.nix {
|
||||
inherit (self) headers sys-headers ld_elf_so;
|
||||
inherit (buildPackages.netbsd)
|
||||
netbsdSetupHook
|
||||
makeMinimal
|
||||
install
|
||||
genassym
|
||||
gencat
|
||||
lorder
|
||||
tsort
|
||||
statHook
|
||||
;
|
||||
};
|
||||
|
||||
libcMinimal = self.callPackage ./pkgs/libcMinimal.nix {
|
||||
inherit (self) headers csu;
|
||||
inherit (buildPackages.netbsd)
|
||||
netbsdSetupHook
|
||||
makeMinimal
|
||||
install
|
||||
genassym
|
||||
gencat
|
||||
lorder
|
||||
tsort
|
||||
statHook
|
||||
rpcgen
|
||||
;
|
||||
};
|
||||
|
||||
librpcsvc = self.callPackage ./pkgs/librpcsvc.nix {
|
||||
inherit (buildPackages.netbsd)
|
||||
netbsdSetupHook
|
||||
makeMinimal
|
||||
install
|
||||
lorder
|
||||
tsort
|
||||
statHook
|
||||
rpcgen
|
||||
;
|
||||
};
|
||||
|
||||
mtree = self.callPackage ./pkgs/mtree.nix { inherit (self) mknod; };
|
||||
tsort = self.callPackage ./pkgs/tsort.nix { inherit (buildNetbsd) makeMinimal install; };
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
{ path = "lib/libpthread"; }
|
||||
@@ -1,12 +1,10 @@
|
||||
{ lib, mkDerivation }:
|
||||
|
||||
mkDerivation (
|
||||
import ./base.nix
|
||||
// {
|
||||
pname = "libpthread-headers";
|
||||
installPhase = "includesPhase";
|
||||
dontBuild = true;
|
||||
noCC = true;
|
||||
meta.platforms = lib.platforms.netbsd;
|
||||
}
|
||||
)
|
||||
mkDerivation {
|
||||
path = "lib/libpthread";
|
||||
pname = "libpthread-headers";
|
||||
installPhase = "includesPhase";
|
||||
dontBuild = true;
|
||||
noCC = true;
|
||||
meta.platforms = lib.platforms.netbsd;
|
||||
}
|
||||
|
||||
@@ -7,31 +7,29 @@
|
||||
librt,
|
||||
}:
|
||||
|
||||
mkDerivation (
|
||||
import ./base.nix
|
||||
// {
|
||||
mkDerivation {
|
||||
path = "lib/libpthread";
|
||||
|
||||
libcMinimal = true;
|
||||
libcMinimal = true;
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
"dev"
|
||||
"man"
|
||||
];
|
||||
outputs = [
|
||||
"out"
|
||||
"dev"
|
||||
"man"
|
||||
];
|
||||
|
||||
SHLIBINSTALLDIR = "$(out)/lib";
|
||||
SHLIBINSTALLDIR = "$(out)/lib";
|
||||
|
||||
# Hack around GCC's limits.h missing the include_next we want See
|
||||
# https://gcc.gnu.org/legacy-ml/gcc/2003-10/msg01278.html
|
||||
NIX_CFLAGS_COMPILE_BEFORE = "-isystem ${stdenvLibcMinimal.cc.libc.dev}/include";
|
||||
# Hack around GCC's limits.h missing the include_next we want See
|
||||
# https://gcc.gnu.org/legacy-ml/gcc/2003-10/msg01278.html
|
||||
NIX_CFLAGS_COMPILE_BEFORE = "-isystem ${stdenvLibcMinimal.cc.libc.dev}/include";
|
||||
|
||||
extraPaths = [
|
||||
"common"
|
||||
libcMinimal.path
|
||||
librt.path
|
||||
"sys"
|
||||
];
|
||||
extraPaths = [
|
||||
"common"
|
||||
libcMinimal.path
|
||||
librt.path
|
||||
"sys"
|
||||
];
|
||||
|
||||
meta.platforms = lib.platforms.netbsd;
|
||||
}
|
||||
)
|
||||
meta.platforms = lib.platforms.netbsd;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user