1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 11:40:45 +00:00
Commit graph

143 commits

Author SHA1 Message Date
Ryan Burns b79cbf32ea freebsd.libc: fix build with LLVM 16+ 2024-01-02 20:29:57 -08:00
Sergei Trofimovich 3b924de945 netbsd.libcurses: fix eval around NIX_CFLAGS_COMPILE
Without the change the eval fails as:

    $ nix build --no-link -f. netbsd.libcurses
    ...
     … while evaluating attribute 'NIX_CFLAGS_COMPILE' of derivation 'libcurses-netbsd-9.2'
       error: value is a string while a list was expected
2023-12-27 14:13:46 +00:00
Astro 32ec12551f netbsd.sys: patch nocombreloc linker flag 2023-11-20 03:21:23 +01:00
Astro 26b585aa7b netbsd.sys: make compiler and linker warnings non-fatal 2023-11-20 03:20:24 +01:00
Adam Joseph cbc8aa437c treewide: use uncurried version of makeScopeWithSplicing 2023-08-14 02:51:10 +03:00
Jan Malakhovski 5852f26bdc treewide: noop: refer to src.name or similar in sourceRoot where appropriate, part 1: trivial cases 2023-08-03 16:32:03 +00:00
Randy Eckenrode 3f948b7664
netbsd.compat: use strip from cctools-port
llvm-strip does not support `-X` for Mach-O, so make sure the cctools
version is used.
2023-07-25 21:28:08 -04:00
Artturin 226e149145 treewide: env.NIX_CFLAGS_COMPILE use optionalString instead of optional
env values must be strings
2023-02-22 21:23:05 +02:00
Artturin f9fdf2d402 treewide: move NIX_CFLAGS_COMPILE to the env attrset
with structuredAttrs lists will be bash arrays which cannot be exported
which will be a issue with some patches and some wrappers like cc-wrapper

this makes it clearer that NIX_CFLAGS_COMPILE must be a string as lists
in env cause a eval failure
2023-02-22 21:23:04 +02:00
Artturin 6f6cc4a22d treewide: use toString on list NIX_CFLAGS_COMPILE
with structuredAttrs lists will be bash arrays which cannot be exported
which will be a issue with some patches and some wrappers like cc-wrapper
2023-02-22 21:23:04 +02:00
github-actions[bot] d8bfd0a059
Merge master into staging-next 2023-01-23 06:01:12 +00:00
Alyssa Ross b19185fdb2
libiconv: use libc header on NetBSD
Let's be consistent about this.

Updated netbsd.libc to have a pname attribute so it's compatible with
libcIconv.
2023-01-22 21:11:41 +00:00
John Ericson 39f60a4e54
Merge pull request #210764 from alyssais/mtdev-freebsd
mtdev: add FreeBSD support
2023-01-18 20:23:44 -05:00
Alyssa Ross 079e593d72
evdev-proto: init at 6.0
FreeBSD implements Linux's evdev API, but doesn't come with headers
for it.  Instead, the Linux headers are just modified to be suitable
for FreeBSD, via a port called evdev-proto.  I don't want to copy the
complicated sed expressions from the port into Nixpkgs, so instead we
just build and install the port inside a Nix derivation.
2023-01-15 17:50:05 +00:00
Alyssa Ross eaf77e7b0b
freebsd.sed: init at 13.1.0 2023-01-14 19:33:40 +00:00
Alyssa Ross 0a77e09a83
netbsd.libpci: init at 9.2 2023-01-13 04:49:19 +00:00
Alyssa Ross ce373ba234
netbsd.libarch: init at 9.2 2023-01-13 04:49:17 +00:00
Artturin 58fa78077c treewide: use splicing convenience functions 2022-12-25 14:05:03 +02:00
John Ericson 0afe9d1f70 freebsd packages: Init at 13.1
Always set `SRCTOP`, set it with abs path

llvmPackages: Bump minimum version for FreeBSD

llvmPackages_*, libgcc, compiler_rt: Hack in enough libs that one can compiler C

freebsd.compat: Rename some things to work around cc-wrapper change

0bea4a194f / #191724 in particular
2022-11-04 16:50:26 -04:00
Jan Tojnar 457f28f6f8 Merge branch 'master' into staging-next
; Conflicts:
;	pkgs/development/tools/codespell/default.nix

codespell 2.2.2 switched to pyproject & setuptools_scm:
https://github.com/codespell-project/codespell/pull/2523
2022-10-19 05:24:28 +02:00
Yureka a25e03e76a
pkgsMusl.netbsd.install: fix build (#196260) 2022-10-19 00:22:54 +02:00
Ryan Burns d5e1a54ffc netbsd.uudecode: fix build on darwin
Requires explicit link to libresolv
2022-10-17 17:24:44 -07:00
John Ericson 044163d6ef bsd: BSD_PATH rename to COMPONENT_PATH
@alyssais and I agreed this is clearer.
2022-10-06 15:33:36 -04:00
John Ericson e3137f73fd netbsd.install: Use writeShellScript 2022-10-06 15:33:36 -04:00
John Ericson dcf7a5ec3d netbsd: Adapt to BSD-common infra changes for FreeBSD
See https://github.com/NixOS/nixpkgs/pull/82131 for the rest of the
changes for FreeBSD. This is PRed separately because it is a macOS
moderate rebuild so we target staging.

The main change is that we CD to the path we're building *after*
applying patches, so we can patch other parts of the tree (from
`extraPaths`) as needed.

Another change is that `netbsd.install` no longer depends on `fts`,
which it evidently no longer needs.
2022-10-06 15:33:28 -04:00
Alyssa Ross 1a80365750
netbsd.libc: fix build
This has been broken since we made -fno-common the default.
2022-10-03 21:52:42 +00:00
Alyssa Ross 2b9c5958a1
netbsd.compat: don't use musl's sys/cdefs.h
When building glib statically, a Meson check would fail, because the
check would interpret any warning as failure, and it would see the
warning that the musl sys/cdefs.h emits about the file being
deprecated.
2022-01-06 14:22:07 +00:00
Alyssa Ross 7be5fbf70f
pkgsStatic.netbsd: fix nbtool_config.h conflicts
In pkgsStatic, /all/ build inputs are propagated.  This means that
netbsd.compat was propagated, along with its setup hook, which broke
static glib builds because glib defines a function with the same name
as one in nbtool_config.h, and nbtool_config.h was being automatically
included in every C file processed by the compiler, in any transitive
dependent of netbsd.compat's setup hook.

To fix this, rather than forcing nbtool_config.h to be included for
_every_ C file in a derivation that depends on netbsd.compat, modify
the NetBSD-specific mkDerivation to detect files that need the header,
and patch it in there where appropriate.  That way, only files that
are part of NetBSD will be affected, not all transitive dependents.
2022-01-06 14:20:18 +00:00
Ryan Burns 577c62aab1 os-specific/netbsd: fix mandoc splicing
This expression is not properly spliced, so we need to
manually specify buildPackages so that mandoc will not
be built for the host platform

Fixes cross-compilation of netbsd.* packages that depend
on mandoc in nativeBuildInputs, such as `getent`.
2021-12-10 18:30:37 -08:00
sternenseemann c271888a89 netbsd.man: fix build
* Fails because it's missing ps2pdf. In the beginning I fixed this by
  providing ghostscript as a nativeBuildInput, but the PDF created for
  man0 doesn't appear to be installed, so we can just patch out the call
  to the tool.

* We need to disable MKRUMP or provide sys/rump/share/man in sourceRoot,
  opted for the former since it's simpler at the moment, but the latter
  is also possible with a custom unpackPhase.
2021-11-15 14:26:13 +01:00
Alyssa Ross f5b089b626 netbsd: add missing rsync native build inputs
Using extraPaths in NetBSD packages now requires rsync, but the rsync
dependency wasn't added to all the packages using extraPaths that
override nativeBuildInputs, so they'd just fail immediately.

Fixes: 75db7f8eb0 ("netbsd: Use rsync to speed up source merging")
2021-11-09 22:53:22 +00:00
Ryan Burns 9eb591df10 netbsd.compat: fix libs by using cctools strip as objcopy
Reverts d43df749ac

NetBSD makefiles strip local symbols from libs using `OBJCOPY?=objcopy`,
which is missing on macOS. GNU objcopy appears to succeed but produces
broken .a libs which do not link into dependers.

(As this issue does not fail the netbsd.compat build,
downstream netbsd.install is added to passthru.tests.)

Since `OBJCOPY` is only used for stripping, we can:
* skip stripping with the hacky `OBJCOPY=echo`
* use cctools strip, which is invoked in the same way

The latter is obviously preferable if it works.
Indeed, locals are stripped, although it doesn't affect size much.
Comparison:

`OBJCOPY=echo`:
```
$ du -b result/lib/*.a
347784	result/lib/libnbcompat.a
357120	result/lib/libnbcompat_p.a
```

`OBJCOPY=${cctools}/bin/strip`:
```
$ du -b result/lib/*.a
347008	result/lib/libnbcompat.a
357120	result/lib/libnbcompat_p.a
```
2021-09-22 17:42:12 -07:00
Ryan Burns d43df749ac netbsd.compat: fix build on darwin
The makefile requires GNU objcopy
2021-09-19 21:58:33 +09:00
John Ericson 2fdb859716 netbsd: Make hard/soft float match systems settings 2021-09-03 14:20:12 +00:00
John Ericson ad609d27b5 netbsd.compat: Fix cross compilation
Not to netbsd, where it isn't needed, but elsewhere.

A few things going on here:

 - Make compat use the "regular" not "host" makefile infra. This,
   however, makes more assumptions that the toolchain is BSD-like, and
   so we need to compensate for them with the likes of:

    - `LORDER=...` and `TSORT=...`

    - Move `export INSTALL_*` to install's setup hook so they don't interfere
      with coreutils install

 - Don't use `DESTDIR` for installing include files, instead set `INCSDIR`.
   This is more proper, but doesn't work when `INCSDIR` is set multiple
   times, unfortunately, as CLI defs override all other assignments. So
   instead set `INCSDIR0` on the CLI, and do some `INCSDIR =
   ${INCSDIR0}/...` in the relevant packages.

    - `INCSDIR` is set just in the NetBSD setup hook because FreeBSD uses
    `INCLUDEDIR`.
2021-09-03 14:19:49 +00:00
John Ericson af58c2cc0c netbsd.compat: Don't configure twice 2021-09-03 03:09:05 +00:00
John Ericson 2810201833 netbsd: Split out path merging from bsd setup hook
I plan on doing the sources for FreeBSD differently. Indeed we might
want to change this for NetBSD too eventually.

In any event, the way we manage sources is not intrinsically the same
across BSDs so it makes sense to pull this out.
2021-07-11 21:11:10 +00:00
John Ericson 75db7f8eb0 netbsd: Use rsync to speed up source merging
The find -exec that was there before is quite slow on my machine. This
is much faster.
2021-07-10 21:20:29 +00:00
github-actions[bot] f8b7190a42
Merge staging-next into staging 2021-06-10 00:06:44 +00:00
ash lea 3f2e9c6dcc netbsd: add aliases for i486 and i586 2021-06-09 22:10:41 +00:00
github-actions[bot] 4db56e21dc
Merge staging-next into staging 2021-06-07 00:15:20 +00:00
Alyssa Ross f2c72bca63 netbsd: disable stack protection on i686
Builds fail otherwise, because the linker can't find the stack
protector symbols.
2021-06-06 18:52:58 +00:00
github-actions[bot] abef57f931
Merge staging-next into staging 2021-05-31 19:44:15 +00:00
Alyssa Ross 7216862bb0 netbsdCross.ld_elf_so: use same stage's libc
We need netbsdCross.ld_elf_so to be the dynamic linker in cross
netbsd's bintools, but netbsdCross doesn't have a libc in stdenv.  So
instead, use netbsdCross.libc for netbsdCross.ld_elf_so.
2021-05-31 14:59:14 +00:00
Alyssa Ross e65724933b netbsd: 9.1 -> 9.2 2021-05-26 11:46:22 +00:00
Alyssa Ross 4a8dbecd16 netbsd: 8.0 -> 9.1
Notes:

- compat: Needs a header from common merged with it's wrapper.

- librt: Needs the jemalloc sources.

- libc: install libc_pic.a

  This was the behaviour on NetBSD 8.0, and ld.elf_so (in its current
  configuration) requires it.  We could also have disabled PIC in
  ld.elf_so.

- sys: fix build

  We use a more recent version of binutils than NetBSD 9.1 does, so we
  need to backport a patch from CURRENT.

Co-authored-by: John Ericson <John.Ericson@Obsidian.Systems>
2021-05-09 18:56:20 +00:00
John Ericson a3e54cb582 Merge remote-tracking branch 'upstream/staging-next' into staging 2021-05-06 15:48:25 -04:00
Alyssa Ross 29271ef915 netbsd.libedit: fix build 2021-05-01 12:46:18 +00:00
Alyssa Ross f27de651fd
netbsd.libcurses: fix build 2021-04-30 13:56:27 +00:00
John Ericson 96b2cb441c
Merge pull request #120283 from Ericson2314/netbsd-fewer-vars
netbsd: Remove some env vars that are probably not needed.
2021-04-23 20:57:18 -04:00