Also add a shell.nix
This commit is contained in:
parent
58a28c2715
commit
85f4104796
13
README.md
13
README.md
@ -172,14 +172,11 @@ If you want to play with the `restream` code, you will have to [install Rust](ht
|
|||||||
There are three ways of building the required restream binary for streaming the reMarkable framebuffer. For these approaches, the generated restream binary will be located under `target/armv7-unknown-linux-gnueabihf/release/restream`.
|
There are three ways of building the required restream binary for streaming the reMarkable framebuffer. For these approaches, the generated restream binary will be located under `target/armv7-unknown-linux-gnueabihf/release/restream`.
|
||||||
|
|
||||||
- **Using nix flakes**
|
- **Using nix flakes**
|
||||||
With [Nix](https://nixos.org/guides/install-nix.html) installed and
|
With [Nix](https://nixos.org/guides/install-nix.html) installed you can
|
||||||
[Nix flakes](https://nixos.wiki/wiki/Flakes#Installing_flakes) enabled, you
|
create the development environment with `nix-shell` or (when using
|
||||||
can easily setup the devlopment environment with:
|
[Nix flakes](https://nixos.wiki/wiki/Flakes#Installing_flakes) `nix-develop`.
|
||||||
```
|
After which you can simply run `cargo build --release` to build the restream
|
||||||
nix develop
|
binary on your machine.
|
||||||
```
|
|
||||||
After which you can simply run `cargo build --release` to build the restream
|
|
||||||
binary.
|
|
||||||
|
|
||||||
- **Using docker and the toltec toolchain:**
|
- **Using docker and the toltec toolchain:**
|
||||||
You can use the [toltec toolchain docker images](https://github.com/toltec-dev/toolchain) to build a restream binary compatible with the reMarkable.
|
You can use the [toltec toolchain docker images](https://github.com/toltec-dev/toolchain) to build a restream binary compatible with the reMarkable.
|
||||||
|
27
default.nix
Normal file
27
default.nix
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
devShell = pkgs: with pkgs; mkShell {
|
||||||
|
buildInputs = [
|
||||||
|
remarkable-toolchain
|
||||||
|
(rust-bin.stable.latest.default.override {
|
||||||
|
targets = [ "armv7-unknown-linux-gnueabihf" ];
|
||||||
|
extensions = [ "rust-src" ];
|
||||||
|
})
|
||||||
|
openssl.dev
|
||||||
|
pkg-config
|
||||||
|
cargo-watch
|
||||||
|
cargo-limit
|
||||||
|
shellcheck
|
||||||
|
lz4
|
||||||
|
];
|
||||||
|
CARGO_BUILD_TARGET="armv7-unknown-linux-gnueabihf";
|
||||||
|
CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER="${pkgs.remarkable-toolchain}/sysroots/x86_64-codexsdk-linux/usr/bin/arm-remarkable-linux-gnueabi/arm-remarkable-linux-gnueabi-gcc";
|
||||||
|
CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_RUSTFLAGS=[
|
||||||
|
"-C link-arg=-march=armv7-a"
|
||||||
|
"-C link-arg=-marm"
|
||||||
|
"-C link-arg=-mfpu=neon"
|
||||||
|
"-C link-arg=-mfloat-abi=hard"
|
||||||
|
"-C link-arg=-mcpu=cortex-a9"
|
||||||
|
"-C link-arg=--sysroot=${pkgs.remarkable-toolchain}/sysroots/cortexa9hf-neon-remarkable-linux-gnueabi"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
26
flake.nix
26
flake.nix
@ -20,30 +20,6 @@
|
|||||||
in
|
in
|
||||||
with pkgs;
|
with pkgs;
|
||||||
{
|
{
|
||||||
devShell = mkShell {
|
devShell = (import ./default.nix).devShell pkgs;
|
||||||
buildInputs = [
|
|
||||||
remarkable-toolchain
|
|
||||||
(rust-bin.stable.latest.default.override {
|
|
||||||
targets = [ "armv7-unknown-linux-gnueabihf" ];
|
|
||||||
extensions = [ "rust-src" ];
|
|
||||||
})
|
|
||||||
openssl.dev
|
|
||||||
pkg-config
|
|
||||||
cargo-watch
|
|
||||||
cargo-limit
|
|
||||||
shellcheck
|
|
||||||
lz4
|
|
||||||
];
|
|
||||||
CARGO_BUILD_TARGET="armv7-unknown-linux-gnueabihf";
|
|
||||||
CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER="${pkgs.remarkable-toolchain}/sysroots/x86_64-codexsdk-linux/usr/bin/arm-remarkable-linux-gnueabi/arm-remarkable-linux-gnueabi-gcc";
|
|
||||||
CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_RUSTFLAGS=[
|
|
||||||
"-C link-arg=-march=armv7-a"
|
|
||||||
"-C link-arg=-marm"
|
|
||||||
"-C link-arg=-mfpu=neon"
|
|
||||||
"-C link-arg=-mfloat-abi=hard"
|
|
||||||
"-C link-arg=-mcpu=cortex-a9"
|
|
||||||
"-C link-arg=--sysroot=${pkgs.remarkable-toolchain}/sysroots/cortexa9hf-neon-remarkable-linux-gnueabi"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user