Commit Graph

54 Commits

Author SHA1 Message Date
Alex Martens
bea58512db rust-bindgen: 0.59.2 -> 0.61.0 2022-11-11 09:47:12 +00:00
Malo Bourgon
16e15fa68f treewide: add meta.mainProgram to many packages 2022-05-04 18:08:19 -07:00
K900
af7c34be0b rustfmt: drop separate nightly alias
If you really want it, override it.
2022-04-07 19:42:14 +03:00
K900
e5f5ad71ac rust-bindgen: use rustfmt-nightly
bindgen's tests rely on specific output from rustfmt that uses
unstable features, so breaks when we build rustfmt as stable.

Also, use a better way to specify the rustfmt executable.
2022-04-06 13:03:23 +03:00
Guillaume Girol
bedabfbcef rustPlatform.bindgenHook: init 2022-02-22 19:37:07 +01:00
Guillaume Girol
d1d0d1184e rust-bindgen: fix meta 2022-02-03 12:00:00 +00:00
Guillaume Girol
653d5a265b rust-bindgen: add tests 2022-02-03 14:53:17 +01:00
Guillaume Girol
703bbde201 rust-bindgen: separate into unwrapped and wrapped 2022-02-03 14:53:17 +01:00
Guillaume Girol
7283e2dd06 rust-bindgen: fix c++ includes
NIX_CXXSTDLIB_COMPILE has been removed in https://github.com/NixOS/nixpkgs/pull/85189
and https://github.com/NixOS/nixpkgs/pull/85189#commitcomment-40987154
remommends using the files in ${clang}/nix-support to find the correct
flags to pass to libclang.
2022-02-03 12:00:00 +00:00
R. Ryantm
d9d632ebfc rust-bindgen: 0.59.1 -> 0.59.2 2021-12-07 01:12:35 +00:00
R. RyanTM
b206d6afc1 rust-bindgen: 0.57.0 -> 0.59.1 2021-09-14 09:13:00 +00:00
Alyssa Ross
5fc7992364 rust-bindgen: use a better drv name for fakeRustup
I saw a derivation called "rustup" building and was concerned why
rust-bindgen would depend on rustup.  If it had been called
"fake-rustup", I wouldn't have had to check the package source to see
what was going on. :)
2021-08-13 12:38:32 +00:00
Arthur Gautier
61a9aafda6 rust-bindgen: some features of bindgen require a recent version of llvm
Features likes 'asm goto' are only available if compiled with llvm >= 11.

This is required for rust-in-linux development for example. I believe
binding to llvmPackages_latest is an acceptable tradeoff.

```
  RUSTC L rust/build_error.o
error: unknown argument: '-fmacro-prefix-map=./='
error: unknown argument: '-fno-stack-clash-protection'
error: unknown warning option '-Wno-frame-address'; did you mean '-Wno-address'? [-Wunknown-warning-option]
error: unknown warning option '-Wno-pointer-to-enum-cast' [-Wunknown-warning-option]
./arch/x86/include/asm/bitops.h:138:9: error: 'asm goto' constructs are not supported yet
./arch/x86/include/asm/bitops.h:162:9: error: 'asm goto' constructs are not supported yet
./arch/x86/include/asm/bitops.h:201:9: error: 'asm goto' constructs are not supported yet
./include/linux/list.h:282:9: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
./include/linux/list.h:318:27: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
./include/linux/list.h:821:10: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
./include/linux/list.h:830:10: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
./arch/x86/include/asm/atomic.h:83:9: error: 'asm goto' constructs are not supported yet
./arch/x86/include/asm/atomic.h:123:9: error: 'asm goto' constructs are not supported yet
./arch/x86/include/asm/atomic.h:137:9: error: 'asm goto' constructs are not supported yet
./arch/x86/include/asm/atomic.h:152:9: error: 'asm goto' constructs are not supported yet
./arch/x86/include/asm/atomic64_64.h:76:9: error: 'asm goto' constructs are not supported yet
./arch/x86/include/asm/atomic64_64.h:118:9: error: 'asm goto' constructs are not supported yet
./arch/x86/include/asm/atomic64_64.h:132:9: error: 'asm goto' constructs are not supported yet
./arch/x86/include/asm/atomic64_64.h:147:9: error: 'asm goto' constructs are not supported yet
./include/linux/jump_label.h:278:2: error: expected '(' after 'asm'
./include/linux/jump_label.h:284:2: error: expected '(' after 'asm'
./include/linux/jump_label.h:306:2: error: expected '(' after 'asm'
./include/linux/jump_label.h:309:3: error: expected '(' after 'asm'
./include/linux/jump_label.h:317:2: error: expected '(' after 'asm'
./include/linux/jump_label.h:320:3: error: expected '(' after 'asm'
./include/linux/llist.h:189:9: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
fatal error: too many errors emitted, stopping now [-ferror-limit=]
error: unknown argument: '-fmacro-prefix-map=./=', err: true
error: unknown argument: '-fno-stack-clash-protection', err: true
error: unknown warning option '-Wno-frame-address'; did you mean '-Wno-address'? [-Wunknown-warning-option], err: true
error: unknown warning option '-Wno-pointer-to-enum-cast' [-Wunknown-warning-option], err: true
./arch/x86/include/asm/bitops.h:138:9: error: 'asm goto' constructs are not supported yet, err: true
./arch/x86/include/asm/bitops.h:162:9: error: 'asm goto' constructs are not supported yet, err: true
./arch/x86/include/asm/bitops.h:201:9: error: 'asm goto' constructs are not supported yet, err: true
./include/linux/list.h:282:9: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier], err: false
./include/linux/list.h:318:27: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier], err: false
./include/linux/list.h:821:10: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier], err: false
./include/linux/list.h:830:10: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier], err: false
./arch/x86/include/asm/atomic.h:83:9: error: 'asm goto' constructs are not supported yet, err: true
./arch/x86/include/asm/atomic.h:123:9: error: 'asm goto' constructs are not supported yet, err: true
./arch/x86/include/asm/atomic.h:137:9: error: 'asm goto' constructs are not supported yet, err: true
./arch/x86/include/asm/atomic.h:152:9: error: 'asm goto' constructs are not supported yet, err: true
./arch/x86/include/asm/atomic64_64.h:76:9: error: 'asm goto' constructs are not supported yet, err: true
./arch/x86/include/asm/atomic64_64.h:118:9: error: 'asm goto' constructs are not supported yet, err: true
./arch/x86/include/asm/atomic64_64.h:132:9: error: 'asm goto' constructs are not supported yet, err: true
./arch/x86/include/asm/atomic64_64.h:147:9: error: 'asm goto' constructs are not supported yet, err: true
./include/linux/jump_label.h:278:2: error: expected '(' after 'asm', err: true
./include/linux/jump_label.h:284:2: error: expected '(' after 'asm', err: true
./include/linux/jump_label.h:306:2: error: expected '(' after 'asm', err: true
./include/linux/jump_label.h:309:3: error: expected '(' after 'asm', err: true
./include/linux/jump_label.h:317:2: error: expected '(' after 'asm', err: true
./include/linux/jump_label.h:320:3: error: expected '(' after 'asm', err: true
./include/linux/llist.h:189:9: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier], err: false
fatal error: too many errors emitted, stopping now [-ferror-limit=], err: true
thread 'main' panicked at 'Unable to generate bindings: ()', src/main.rs:54:36
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
make[1]: *** [rust/Makefile:141: rust/bindings_generated.rs] Error 1
make[1]: *** Deleting file 'rust/bindings_generated.rs'
```

Signed-off-by: Arthur Gautier <baloo@superbaloo.net>
2021-06-16 18:52:09 +00:00
Joachim Breitner
570d58be31
rust-bindgen: Update cargoSha256 (#123349)
Co-authored-by: fortune <lythe1107@gmail.com>
2021-05-18 02:06:41 +02:00
Andrew Childs
7869d16545 llvmPackages: Multuple outputs for everythting
Also begin to start work on cross compilation, though that will have to
be finished later.

The patches are based on the first version of
https://reviews.llvm.org/D99484. It's very annoying to do the
back-porting but the review has uncovered nothing super major so I'm
fine sticking with what I've got.

Beyond making the outputs work, I also strove to re-sync the packages,
as they have been drifting pointlessly apart for some time.

----

Other misc notes, highly incomplete

- lvm-config-native and llvm-config are put in `dev` because they are
  tools just for build time.

- Clang no longer has an lld dep. That was introduced in
  db29857eb3, but if clang needs help
  finding lld when it is used we should just pass it flags / put in the
  resource dir. Providing it at build time increases critical path
  length for no good reason.

----

A note on `nativeCC`:

`stdenv` takes tools from the previous stage, so:

1. `pkgsBuildBuild`: `(?1, x, x)`
2. `pkgsBuildBuild.stdenv.cc`: `(?0, ?1, x)`

while:

1. `pkgsBuildBuild`: `(?1, x, x)`
2. `pkgsBuildBuild.targetPackages`: `(x, x, ?2)`
3. `pkgsBuildBuild.targetPackages.stdenv.cc`: `(?1, x, x)`
2021-04-30 05:41:00 +00:00
R. RyanTM
abf7ed76bc rust-bindgen: 0.55.1 -> 0.57.0 2021-03-09 13:28:21 +00:00
Pavol Rusnak
a6ce00c50c
treewide: remove stdenv where not needed 2021-01-25 18:31:47 +01:00
Christian Kögler
23b0a88572 rust-bindgen: Resolve "/usr/bin/env bash" to fix usage in Nix build 2021-01-21 20:16:58 +01:00
Profpatsch
4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00
Yuki Okushi
afc8027dde rust-bindgen: 0.54.1 -> 0.55.1 2020-10-20 09:09:13 -07:00
Ben Siraphob
683a87dbeb treewide: remove periods from end of package descriptions 2020-10-17 08:22:31 -07:00
Yuki Okushi
81e215e691 rust-bindgen: 0.53.2 -> 0.54.1 2020-08-17 08:30:07 +09:00
R. RyanTM
19fdac26c4 rust-bindgen: 0.53.1 -> 0.53.2 2020-03-12 06:10:16 +00:00
Benjamin Hipple
16eb59cecb rust-bindgen: upgrade cargo fetcher and cargoSha256
Infra upgrade as part of #79975; no functional change expected.
2020-02-16 01:08:34 -08:00
Benjamin Hipple
eb11feaa0b treewide: change fetchCargoTarball default to opt-out
Changes the default fetcher in the Rust Platform to be the newer
`fetchCargoTarball`, and changes every application using the current default to
instead opt out.

This commit does not change any hashes or cause any rebuilds. Once integrated,
we will start deleting the opt-outs and recomputing hashes.

See #79975 for details.
2020-02-13 22:41:37 -08:00
R. RyanTM
3b1608a94b rust-bindgen: 0.52.0 -> 0.53.1 2020-02-10 11:14:48 +00:00
John Children
666e58da47 rust-bindgen: 0.51.1 -> 0.52.0
Update for latest point release from a month ago: https://github.com/rust-lang/rust-bindgen/releases/tag/v0.52.0
2019-12-20 13:36:27 +01:00
Jonathan Ringer
364ae632c6 rust-bindgen: 0.51.0 -> 0.51.1 2019-11-09 08:05:10 +00:00
Vladimír Čunát
e19b17cc14
rust-bindgen: fixup build with rustc 1.37
Thanks to Symphorien: #67426
2019-08-25 14:23:01 +02:00
xrelkd
a7c2dd267d rust-bindgen: 0.50.0 -> 0.51.0 2019-07-27 07:48:47 +08:00
xrelkd
8429ff12b6 rust-bindgen: 0.49.3 -> 0.50.0 2019-07-02 10:54:04 +08:00
xrelkd
438b487561 rust-bindgen: 0.49.2 -> 0.49.3 2019-06-27 00:03:44 +08:00
arcnmx
250b31dbfc rust-bindgen: 0.49.0 -> 0.49.2
Update fixes a checkPhase test on darwin.
2019-06-24 13:48:33 -07:00
xrelkd
6361e70117 rust-bindgen: 0.42.2 -> 0.49.0
Update homepage URL (rust-bindgen has been moved to
https://github.com/rust-lang/rust-bindgen from
https://github.com/rust-lang-nursery/rust-bindgen)
2019-04-26 17:51:49 +08:00
Jörg Thalheim
dadc7eb329
treewide: use runtimeShell instead of stdenv.shell whenever possible
Whenever we create scripts that are installed to $out, we must use runtimeShell
in order to get the shell that can be executed on the machine we create the
package for. This is relevant for cross-compiling. The only use case for
stdenv.shell are scripts that are executed as part of the build system.
Usages in checkPhase are borderline however to decrease the likelyhood
of people copying the wrong examples, I decided to use runtimeShell as well.
2019-02-26 14:10:49 +00:00
Symphorien Gibol
c73f75dc5e rust-bindgen: enable tests
now that we have a recent enough rustfmt
2018-11-24 00:55:49 +01:00
Vladyslav Mykhailichenko
b4b5862be9 rust-bindgen: 0.40.0 -> 0.42.2 2018-10-11 23:57:02 +03:00
Vladyslav M
6c90a975c2 rust-bindgen: 0.37.0 -> 0.40.0 (#46137) 2018-09-28 22:54:43 +02:00
Symphorien Gibol
4c4fc2299c rust-bindgen: wrap to add required library compilation flags
The easy part is to add NIX_CFLAGS_COMPILE for "regular" libraries.
A bit more tricky is to add the required flags for libclang to find
libstdcxx. For this we parse arguments to bindgen to look for
-x c++ or -xc++ and if found add NIX_CXXSTDLIB_COMPILE to the arguments.
This variable is populated by a complex dance of setupHooks. We trigger
this by adding clang to propagatedBuildInputs. A more subtle way may
exist.
2018-08-28 18:26:42 +02:00
R. RyanTM
0106dfcbeb rust-bindgen: 0.36.1 -> 0.37.0 (#40833)
Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools.

This update was made based on information from https://repology.org/metapackage/rust-bindgen/versions.

These checks were done:

- built on NixOS
- /nix/store/y7lbrcpy05c1br43257fj056p6vf269l-rust-bindgen-0.37.0/bin/bindgen passed the binary check.
- Warning: no invocation of /nix/store/y7lbrcpy05c1br43257fj056p6vf269l-rust-bindgen-0.37.0/bin/.bindgen-wrapped had a zero exit code or showed the expected version
- 1 of 2 passed binary check by having a zero exit code.
- 1 of 2 passed binary check by having the new version present in output.
- found 0.37.0 with grep in /nix/store/y7lbrcpy05c1br43257fj056p6vf269l-rust-bindgen-0.37.0
- directory tree listing: https://gist.github.com/dab90e1565932370211bc1cb47b526d9
- du listing: https://gist.github.com/1ea884a58cb25990e712703124f8a6da
2018-05-22 02:07:27 +02:00
R. RyanTM
366b16d8e1 rust-bindgen: 0.36.0 -> 0.36.1
Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools.

This update was made based on information from https://repology.org/metapackage/rust-bindgen/versions.

These checks were done:

- built on NixOS
- ran ‘/nix/store/vpn165c8nv09k30dsl7gx0crzbdzw4im-rust-bindgen-0.36.1/bin/bindgen -h’ got 0 exit code
- ran ‘/nix/store/vpn165c8nv09k30dsl7gx0crzbdzw4im-rust-bindgen-0.36.1/bin/bindgen --help’ got 0 exit code
- ran ‘/nix/store/vpn165c8nv09k30dsl7gx0crzbdzw4im-rust-bindgen-0.36.1/bin/bindgen -V’ and found version 0.36.1
- ran ‘/nix/store/vpn165c8nv09k30dsl7gx0crzbdzw4im-rust-bindgen-0.36.1/bin/bindgen --version’ and found version 0.36.1
- found 0.36.1 with grep in /nix/store/vpn165c8nv09k30dsl7gx0crzbdzw4im-rust-bindgen-0.36.1
- directory tree listing: https://gist.github.com/6731d17415819fe988768028fda0e150
2018-05-12 14:02:36 +02:00
Vladyslav Mykhailichenko
6f63625144 rust-bindgen: 0.35.0 -> 0.36.0 2018-04-12 23:01:03 +03:00
Vladyslav M
535738eb94 rust-bindgen: 0.32.1 -> 0.35.0 2018-03-30 20:47:54 +02:00
dywedir
0d85bddd06 rust-bindgen: 0.31.1 -> 0.32.1 2017-12-19 22:06:05 +02:00
dywedir
4cbf66b578 rust-bindgen: 0.30.0 -> 0.31.1 2017-10-29 00:42:42 +03:00
Kevin Cox
5f8cf0048e rust: update cargo builder to fetch registry dynamically
The biggest benefit is that we no longer have to update the registry
package. This means that just about any cargo package can be built by
nix. No longer does `cargo update` need to be feared because it will
update to packages newer then what is available in nixpkgs.

Instead of fetching the cargo registry this bundles all the source code
into a "vendor/" folder.

This also uses the new --frozen and --locked flags which is nice.

Currently cargo-vendor only provides binaries for Linux and
macOS 64-bit. This can be solved by building it for the other
architectures and uploading it somewhere (like the NixOS cache).

This also has the downside that it requires a change to everyone's deps
hash. And if the old one is used because it was cached it will fail to
build as it will attempt to use the old version. For this reason the
attribute has been renamed to `cargoSha256`.

Authors:
* Kevin Cox <kevincox@kevincox.ca>
* Jörg Thalheim <Mic92@users.noreply.github.com>
* zimbatm <zimbatm@zimbatm.com>
2017-10-23 00:30:47 +01:00
dywedir
f71d121173 rust-bindgen: 0.29.0 -> 0.30.0 2017-08-29 00:14:20 +03:00
dywedir
6c18491470 rust-bindgen: 0.26.1 -> 0.29.0 2017-07-28 13:33:03 +03:00
Benjamin Saunders
75ca369355 rust-bindgen: 0.25.5 -> 0.26.1 2017-07-06 23:29:54 -07:00
dywedir
d7d6bacfbb rust-bindgen: 0.24.0 -> 0.25.5 2017-06-19 13:10:35 +03:00