-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #80 from rien/nix-flake
Add Nix devShell: flake.nix and shell.nix
- Loading branch information
Showing
8 changed files
with
153 additions
and
15 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,3 +33,19 @@ jobs: | |
|
||
- name: Shell Formatter | ||
run: docker run -v $GITHUB_WORKSPACE:/mnt -w /mnt mvdan/shfmt -d reStream.sh | ||
|
||
build: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: cachix/[email protected] | ||
with: | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
|
||
- run: nix-shell | ||
- run: cargo build |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
]; | ||
}; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
description = "Stream the reMarkable screen to your computer"; | ||
|
||
inputs = { | ||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
rust-overlay = { | ||
url = "github:oxalica/rust-overlay"; | ||
inputs.nixpkgs.follows = "nixpkgs"; | ||
inputs.flake-utils.follows = "flake-utils"; | ||
}; | ||
}; | ||
outputs = {self, nixpkgs, flake-utils, rust-overlay, ... }: | ||
flake-utils.lib.eachDefaultSystem (system: | ||
let | ||
overlays = [ (import rust-overlay) ]; | ||
pkgs = import nixpkgs { | ||
inherit system overlays; | ||
}; | ||
in | ||
with pkgs; | ||
{ | ||
devShell = (import ./default.nix).devShell pkgs; | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
let | ||
pkgs = import <nixpkgs> { | ||
overlays = [ | ||
(import (builtins.fetchTarball "https://github.com/oxalica/rust-overlay/archive/master.tar.gz")) | ||
]; | ||
}; | ||
reStreamDev = import ./default.nix; | ||
in reStreamDev.devShell pkgs |