diff options
author | John Ericson <git@JohnEricson.me> | 2024-06-18 15:25:50 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-18 15:25:50 -0400 |
commit | f183a68f39e015dc07a82578df1715f05714b863 (patch) | |
tree | 570392cfc1bbf287de8e7dd2f3283f89097e9376 /pkgs | |
parent | 240648a162860672cd64b714944747e12d70741d (diff) | |
parent | b6727bbeac10eba4b4b157b51a8521390fc94f3c (diff) |
Merge pull request #320840 from obsidiansystems/bsd-misc
A few misc BSD related cleanups
Diffstat (limited to 'pkgs')
54 files changed, 91 insertions, 216 deletions
diff --git a/pkgs/os-specific/bsd/netbsd/default.nix b/pkgs/os-specific/bsd/netbsd/default.nix index e0d03108960c0..5f5ec212f2698 100644 --- a/pkgs/os-specific/bsd/netbsd/default.nix +++ b/pkgs/os-specific/bsd/netbsd/default.nix @@ -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 { diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/cksum.nix b/pkgs/os-specific/bsd/netbsd/pkgs/cksum.nix index a2ec387501ae1..a95df55874e42 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/cksum.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/cksum.nix @@ -2,7 +2,5 @@ mkDerivation { path = "usr.bin/cksum"; - version = "9.2"; - sha256 = "0msfhgyvh5c2jmc6qjnf12c378dhw32ffsl864qz4rdb2b98rfcq"; meta.platforms = lib.platforms.netbsd; } diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/column.nix b/pkgs/os-specific/bsd/netbsd/pkgs/column.nix index f3cebfa9ab261..a51369433f6c2 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/column.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/column.nix @@ -1,7 +1,3 @@ { mkDerivation }: -mkDerivation { - path = "usr.bin/column"; - version = "9.2"; - sha256 = "0r6b0hjn5ls3j3sv6chibs44fs32yyk2cg8kh70kb4cwajs4ifyl"; -} +mkDerivation { path = "usr.bin/column"; } diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/common.nix b/pkgs/os-specific/bsd/netbsd/pkgs/common.nix deleted file mode 100644 index 464fc1c9e0c26..0000000000000 --- a/pkgs/os-specific/bsd/netbsd/pkgs/common.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ fetchNetBSD }: - -fetchNetBSD "common" "9.2" "1pfylz9r3ap5wnwwbwczbfjb1m5qdyspzbnmxmcdkpzz2zgj64b9" diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/compat/package.nix b/pkgs/os-specific/bsd/netbsd/pkgs/compat/package.nix index 4c149e95c1ae6..91a2bb8755c89 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/compat/package.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/compat/package.nix @@ -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; } ) diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/config.nix b/pkgs/os-specific/bsd/netbsd/pkgs/config.nix index c423f3ca86760..272e9065b29b7 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/config.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/config.nix @@ -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 ]; } diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/csu.nix b/pkgs/os-specific/bsd/netbsd/pkgs/csu.nix index 66443331490f5..a0d7ca419c1c4 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/csu.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/csu.nix @@ -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 ]; } diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/dict.nix b/pkgs/os-specific/bsd/netbsd/pkgs/dict.nix index 0d7d026dd21d2..8d27f29a75e57 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/dict.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/dict.nix @@ -3,7 +3,5 @@ mkDerivation { path = "share/dict"; noCC = true; - version = "9.2"; - sha256 = "0svfc0byk59ri37pyjslv4c4rc7zw396r73mr593i78d39q5g3ad"; makeFlags = defaultMakeFlags ++ [ "BINDIR=$(out)/share" ]; } diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/fts/package.nix b/pkgs/os-specific/bsd/netbsd/pkgs/fts/package.nix index 7c64658bf2e51..57fc0633b0886 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/fts/package.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/fts/package.nix @@ -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 = '' diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/genassym.nix b/pkgs/os-specific/bsd/netbsd/pkgs/genassym.nix index 7f81a77a02dd2..9eed584b29ae4 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/genassym.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/genassym.nix @@ -1,7 +1,3 @@ { mkDerivation }: -mkDerivation { - path = "usr.bin/genassym"; - version = "9.2"; - sha256 = "1acl1dz5kvh9h5806vkz2ap95rdsz7phmynh5i3x5y7agbki030c"; -} +mkDerivation { path = "usr.bin/genassym"; } diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/gencat.nix b/pkgs/os-specific/bsd/netbsd/pkgs/gencat.nix index 411be85e91e2f..ea701b6404ecc 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/gencat.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/gencat.nix @@ -1,7 +1,3 @@ { mkDerivation }: -mkDerivation { - path = "usr.bin/gencat"; - version = "9.2"; - sha256 = "0gd463x1hg36bhr7y0xryb5jyxk0z0g7xvy8rgk82nlbnlnsbbwb"; -} +mkDerivation { path = "usr.bin/gencat"; } diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/getconf.nix b/pkgs/os-specific/bsd/netbsd/pkgs/getconf.nix index c8483d454b877..2feb6495ccf86 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/getconf.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/getconf.nix @@ -1,7 +1,3 @@ { mkDerivation }: -mkDerivation { - path = "usr.bin/getconf"; - sha256 = "122vslz4j3h2mfs921nr2s6m078zcj697yrb75rwp2hnw3qz4s8q"; - version = "9.2"; -} +mkDerivation { path = "usr.bin/getconf"; } diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/getent/package.nix b/pkgs/os-specific/bsd/netbsd/pkgs/getent/package.nix index 7a9acb1e0a9e8..b6a4efad4ac9c 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/getent/package.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/getent/package.nix @@ -2,7 +2,5 @@ mkDerivation { path = "usr.bin/getent"; - sha256 = "1qngywcmm0y7nl8h3n8brvkxq4jw63szbci3kc1q6a6ndhycbbvr"; - version = "9.2"; patches = [ ./getent.patch ]; } diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/i18n_module.nix b/pkgs/os-specific/bsd/netbsd/pkgs/i18n_module.nix index c76ada865775e..066d9f236f9bf 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/i18n_module.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/i18n_module.nix @@ -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 ]; } diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/include.nix b/pkgs/os-specific/bsd/netbsd/pkgs/include.nix index ec316a63174fd..6df34b96095e7 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/include.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/include.nix @@ -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; diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/install/package.nix b/pkgs/os-specific/bsd/netbsd/pkgs/install/package.nix index 0fc6ca452be0d..2dbec08f15e85 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/install/package.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/install/package.nix @@ -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 diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/ld_elf_so.nix b/pkgs/os-specific/bsd/netbsd/pkgs/ld_elf_so.nix index a350e81d32064..7f25ce097ff0d 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/ld_elf_so.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/ld_elf_so.nix @@ -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; } diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/libarch.nix b/pkgs/os-specific/bsd/netbsd/pkgs/libarch.nix index 93ea02f8a17c1..457ea6fa48d91 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/libarch.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/libarch.nix @@ -2,7 +2,5 @@ mkDerivation { path = "lib/libarch"; - version = "9.2"; - sha256 = "6ssenRhuSwp0Jn71ErT0PrEoCJ+cIYRztwdL4QTDZsQ="; meta.platforms = lib.platforms.netbsd; } diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/libc.nix b/pkgs/os-specific/bsd/netbsd/pkgs/libc.nix index d755e4b6870a1..cf71857776d83 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/libc.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/libc.nix @@ -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 diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/libcrypt.nix b/pkgs/os-specific/bsd/netbsd/pkgs/libcrypt.nix index c5f9deff589c4..abcb2cfb14fb8 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/libcrypt.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/libcrypt.nix @@ -2,8 +2,6 @@ mkDerivation { path = "lib/libcrypt"; - version = "9.2"; - sha256 = "0siqan1wdqmmhchh2n8w6a8x1abbff8n4yb6jrqxap3hqn8ay54g"; SHLIBINSTALLDIR = "$(out)/lib"; meta.platforms = lib.platforms.netbsd; } diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/libcurses.nix b/pkgs/os-specific/bsd/netbsd/pkgs/libcurses.nix index 5072821db9117..8d61bcfdf7d97 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/libcurses.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/libcurses.nix @@ -9,8 +9,6 @@ mkDerivation { path = "lib/libcurses"; - version = "9.2"; - sha256 = "0pd0dggl3w4bv5i5h0s1wrc8hr66n4hkv3zlklarwfdhc692fqal"; buildInputs = [ libterminfo ]; env.NIX_CFLAGS_COMPILE = toString ( [ diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/libedit.nix b/pkgs/os-specific/bsd/netbsd/pkgs/libedit.nix index ee1e7bf79f964..cb9951cb8cf10 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/libedit.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/libedit.nix @@ -9,8 +9,6 @@ mkDerivation { path = "lib/libedit"; - version = "9.2"; - sha256 = "1wqhngraxwqk4jgrf5f18jy195yrp7c06n1gf31pbplq79mg1bcj"; buildInputs = [ libterminfo libcurses diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/libm.nix b/pkgs/os-specific/bsd/netbsd/pkgs/libm.nix index f36e97f8e6ae0..8a2304cacbca1 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/libm.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/libm.nix @@ -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 ]; } diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/libossaudio.nix b/pkgs/os-specific/bsd/netbsd/pkgs/libossaudio.nix index 51bbc216e2046..a74176db68cdf 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/libossaudio.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/libossaudio.nix @@ -2,7 +2,5 @@ mkDerivation { path = "lib/libossaudio"; - version = "9.2"; - sha256 = "16l3bfy6dcwqnklvh3x0ps8ld1y504vf57v9rx8f9adzhb797jh0"; meta.platforms = lib.platforms.netbsd; } diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/libpci.nix b/pkgs/os-specific/bsd/netbsd/pkgs/libpci.nix index b0be4a2da723a..69d1ff5accca4 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/libpci.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/libpci.nix @@ -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 ]; } diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/libpthread/base.nix b/pkgs/os-specific/bsd/netbsd/pkgs/libpthread/base.nix index d8ea7c553eba3..08c298c0fe5d5 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/libpthread/base.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/libpthread/base.nix @@ -1,5 +1 @@ -{ - path = "lib/libpthread"; - version = "9.2"; - sha256 = "0mlmc31k509dwfmx5s2x010wxjc44mr6y0cbmk30cfipqh8c962h"; -} +{ path = "lib/libpthread"; } diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/libpthread/package.nix b/pkgs/os-specific/bsd/netbsd/pkgs/libpthread/package.nix index 88d392e20b4a8..28665b351f88a 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/libpthread/package.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/libpthread/package.nix @@ -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; } diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/libresolv.nix b/pkgs/os-specific/bsd/netbsd/pkgs/libresolv.nix index 24bc4f2f9e002..7db4948e6939b 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/libresolv.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/libresolv.nix @@ -6,8 +6,6 @@ mkDerivation { path = "lib/libresolv"; - version = "9.2"; - sha256 = "1am74s74mf1ynwz3p4ncjkg63f78a1zjm983q166x4sgzps15626"; meta.platforms = lib.platforms.netbsd; - extraPaths = [ libc.src ]; + extraPaths = [ libc.path ]; } diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/librpcsvc.nix b/pkgs/os-specific/bsd/netbsd/pkgs/librpcsvc.nix index 8d757a8a84304..3f2d392ba8c5d 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/librpcsvc.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/librpcsvc.nix @@ -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 = [ diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/librt.nix b/pkgs/os-specific/bsd/netbsd/pkgs/librt.nix index fa0229953b66b..4e4bf0bc5ac4b 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/librt.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/librt.nix @@ -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 diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/libterminfo.nix b/pkgs/os-specific/bsd/netbsd/pkgs/libterminfo.nix index 6ac573d865b1a..6e7b59df2ed5e 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/libterminfo.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/libterminfo.nix @@ -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" ]; } diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/libutil.nix b/pkgs/os-specific/bsd/netbsd/pkgs/libutil.nix index fdc57df9c231e..d5bf075fc5e7d 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/libutil.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/libutil.nix @@ -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 diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/locale/package.nix b/pkgs/os-specific/bsd/netbsd/pkgs/locale/package.nix index 3c61e8517b35b..e3e06ba1a152c 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/locale/package.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/locale/package.nix @@ -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"; } diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/lorder.nix b/pkgs/os-specific/bsd/netbsd/pkgs/lorder.nix index 0b99a794b07a0..836fa7500e579 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/lorder.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/lorder.nix @@ -11,8 +11,6 @@ mkDerivation { path = "usr.bin/lorder"; - version = "9.2"; - sha256 = "0rjf9blihhm0n699vr2bg88m4yjhkbxh6fxliaay3wxkgnydjwn2"; nativeBuildInputs = [ bsdSetupHook netbsdSetupHook diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/make-rules.nix b/pkgs/os-specific/bsd/netbsd/pkgs/make-rules.nix index 66086c01c233f..a1e8d1482c215 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/make-rules.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/make-rules.nix @@ -9,8 +9,6 @@ mkDerivation { path = "share/mk"; - sha256 = "0w9x77cfnm6zwy40slradzi0ip9gz80x6lk7pvnlxzsr2m5ra5sy"; - version = "9.2"; noCC = true; buildInputs = [ ]; diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/make.nix b/pkgs/os-specific/bsd/netbsd/pkgs/make.nix index 4d0b9f4b4cf22..9612ca7ff4893 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/make.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/make.nix @@ -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" ]; } diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/makeMinimal.nix b/pkgs/os-specific/bsd/netbsd/pkgs/makeMinimal.nix index 62a4d4a6a1246..ad70b6b8cd072 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/makeMinimal.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/makeMinimal.nix @@ -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 ]; } diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/man.nix b/pkgs/os-specific/bsd/netbsd/pkgs/man.nix index bce5bcee66946..527c547fdaad0 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/man.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/man.nix @@ -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 = '' diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/misc.nix b/pkgs/os-specific/bsd/netbsd/pkgs/misc.nix index 7f96f4d1495ad..726acf27d50b0 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/misc.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/misc.nix @@ -3,7 +3,5 @@ mkDerivation { path = "share/misc"; noCC = true; - version = "9.2"; - sha256 = "1j2cdssdx6nncv8ffj7f7ybl7m9hadjj8vm8611skqdvxnjg6nbc"; makeFlags = defaultMakeFlags ++ [ "BINDIR=$(out)/share" ]; } diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/mkDerivation.nix b/pkgs/os-specific/bsd/netbsd/pkgs/mkDerivation.nix index 849d2b1da3fbf..f4f103087587d 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/mkDerivation.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/mkDerivation.nix @@ -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 = [ ]; diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/mknod.nix b/pkgs/os-specific/bsd/netbsd/pkgs/mknod.nix index 5c4c172e40a7d..bf7d8b7db689b 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/mknod.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/mknod.nix @@ -1,7 +1,3 @@ { mkDerivation }: -mkDerivation { - path = "sbin/mknod"; - version = "9.2"; - sha256 = "1d9369shzwgixz3nph991i8q5vk7hr04py3n9avbfbhzy4gndqs2"; -} +mkDerivation { path = "sbin/mknod"; } diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/mtree.nix b/pkgs/os-specific/bsd/netbsd/pkgs/mtree.nix index 723da3ad891bc..8310941c7cb22 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/mtree.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/mtree.nix @@ -2,7 +2,5 @@ mkDerivation { path = "usr.sbin/mtree"; - version = "9.2"; - sha256 = "04p7w540vz9npvyb8g8hcf2xa05phn1y88hsyrcz3vwanvpc0yv9"; - extraPaths = [ mknod.src ]; + extraPaths = [ mknod.path ]; } diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/nbperf.nix b/pkgs/os-specific/bsd/netbsd/pkgs/nbperf.nix index a23c5dddfc9f8..3b52eae96c3b2 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/nbperf.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/nbperf.nix @@ -1,7 +1,3 @@ { mkDerivation }: -mkDerivation { - path = "usr.bin/nbperf"; - version = "9.2"; - sha256 = "1nxc302vgmjhm3yqdivqyfzslrg0vjpbss44s74rcryrl19mma9r"; -} +mkDerivation { path = "usr.bin/nbperf"; } diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/netbsdSetupHook/setup-hook.sh b/pkgs/os-specific/bsd/netbsd/pkgs/netbsdSetupHook/setup-hook.sh index ef00ea418e535..8c3742a76534b 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/netbsdSetupHook/setup-hook.sh +++ b/pkgs/os-specific/bsd/netbsd/pkgs/netbsdSetupHook/setup-hook.sh @@ -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) diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/rpcgen.nix b/pkgs/os-specific/bsd/netbsd/pkgs/rpcgen.nix index b1482d4dff112..dc6ceb7bd634d 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/rpcgen.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/rpcgen.nix @@ -1,7 +1,3 @@ { mkDerivation }: -mkDerivation { - path = "usr.bin/rpcgen"; - version = "9.2"; - sha256 = "1kfgfx54jg98wbg0d95p0rvf4w0302v8fz724b0bdackdsrd4988"; -} +mkDerivation { path = "usr.bin/rpcgen"; } diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/source.nix b/pkgs/os-specific/bsd/netbsd/pkgs/source.nix new file mode 100644 index 0000000000000..432de84ffb3e1 --- /dev/null +++ b/pkgs/os-specific/bsd/netbsd/pkgs/source.nix @@ -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="; +} diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/stat/package.nix b/pkgs/os-specific/bsd/netbsd/pkgs/stat/package.nix index 397b1f5303c15..522a7a1837b18 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/stat/package.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/stat/package.nix @@ -14,8 +14,6 @@ mkDerivation { path = "usr.bin/stat"; - version = "9.2"; - sha256 = "18nqwlndfc34qbbgqx5nffil37jfq9aw663ippasfxd2hlyc106x"; nativeBuildInputs = [ bsdSetupHook netbsdSetupHook diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/sys/base.nix b/pkgs/os-specific/bsd/netbsd/pkgs/sys/base.nix index 4c140fa3bdef7..6a6f8a5032768 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/sys/base.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/sys/base.nix @@ -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" ]; } diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/sys/headers.nix b/pkgs/os-specific/bsd/netbsd/pkgs/sys/headers.nix index 2df35efc199ad..65fabedfcb457 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/sys/headers.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/sys/headers.nix @@ -14,7 +14,6 @@ config, genassym, defaultMakeFlags, - common, }: let base = import ./base.nix { @@ -34,7 +33,6 @@ let config genassym defaultMakeFlags - common ; }; in diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/sys/package.nix b/pkgs/os-specific/bsd/netbsd/pkgs/sys/package.nix index c8e6edab5f48f..cb691dc87855d 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/sys/package.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/sys/package.nix @@ -14,7 +14,6 @@ config, genassym, defaultMakeFlags, - common, }: let base = import ./base.nix { @@ -34,7 +33,6 @@ let config genassym defaultMakeFlags - common ; }; in diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/tic.nix b/pkgs/os-specific/bsd/netbsd/pkgs/tic.nix index e0900652108fd..f71df930ce1c3 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/tic.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/tic.nix @@ -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" ]; } diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/tsort.nix b/pkgs/os-specific/bsd/netbsd/pkgs/tsort.nix index 9200bc57a73e0..b1ab320da0c8f 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/tsort.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/tsort.nix @@ -11,8 +11,6 @@ mkDerivation { path = "usr.bin/tsort"; - version = "9.2"; - sha256 = "1dqvf9gin29nnq3c4byxc7lfd062pg7m84843zdy6n0z63hnnwiq"; nativeBuildInputs = [ bsdSetupHook netbsdSetupHook diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/uudecode.nix b/pkgs/os-specific/bsd/netbsd/pkgs/uudecode.nix index 7592db3eaf180..1e58df16ceeec 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/uudecode.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/uudecode.nix @@ -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"; } diff --git a/pkgs/top-level/release-cross.nix b/pkgs/top-level/release-cross.nix index d6896155c920e..4b41dc5bdcd27 100644 --- a/pkgs/top-level/release-cross.nix +++ b/pkgs/top-level/release-cross.nix @@ -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 |