-
-
Notifications
You must be signed in to change notification settings - Fork 38
Updated wayshot devel for NixOS #130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
901ab2e
Removed old flakes
Rishik-Y f1e3f4f
Updating nix file for developing environment
Rishik-Y 250a975
Removed all unnecessary dependency!
Rishik-Y f52012b
Made more understandable and nixfmt
Rishik-Y 6113ee1
Removed Hard code
Rishik-Y b423ac8
added Flakes
Rishik-Y 3776803
added flake.lock
Rishik-Y 36a9de9
updated flake.nix
Rishik-Y 69b1d77
Updated flake.lock
Rishik-Y 05de080
Removed unnecessary comments
Rishik-Y f508b16
Changed flake.nix to use shell.nix now
Rishik-Y File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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 |
|---|---|---|
| @@ -1,44 +1,17 @@ | ||
| { | ||
| description = "Wayshot devel"; | ||
| description = "Development environment for wayshot"; | ||
|
|
||
| inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; }; | ||
| inputs = { | ||
| flake-utils.url = "github:numtide/flake-utils"; | ||
| }; | ||
|
|
||
| outputs = { self, nixpkgs, ... }: | ||
| let | ||
| pkgsFor = system: | ||
| import nixpkgs { | ||
| inherit system; | ||
| overlays = [ ]; | ||
| }; | ||
|
|
||
| targetSystems = [ "aarch64-linux" "x86_64-linux" ]; | ||
| in { | ||
| devShells = nixpkgs.lib.genAttrs targetSystems (system: | ||
| let pkgs = pkgsFor system; | ||
| in { | ||
| default = pkgs.mkShell { | ||
| name = "Wayshot-devel"; | ||
| nativeBuildInputs = with pkgs; [ | ||
| # Compilers | ||
| cargo | ||
| rustc | ||
| scdoc | ||
|
|
||
| # Libs | ||
| wayland-protocols | ||
| wayland | ||
|
|
||
| # Tools | ||
| wayland-scanner | ||
| clippy | ||
| gdb | ||
| gnumake | ||
| rust-analyzer | ||
| rustfmt | ||
| strace | ||
| valgrind | ||
| ]; | ||
| }; | ||
| }); | ||
| }; | ||
| outputs = | ||
| { | ||
| flake-utils, | ||
| ... | ||
| }: | ||
| flake-utils.lib.eachDefaultSystem (system: | ||
| { | ||
| devShells.default = import ./shell.nix; | ||
| }); | ||
| } |
This file contains hidden or 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,45 @@ | ||
| # shell.nix | ||
|
|
||
| with (import <nixpkgs> { }); | ||
|
|
||
| let | ||
| libPath = | ||
| with pkgs; | ||
| lib.makeLibraryPath [ | ||
| libgbm | ||
| wayland | ||
| # You can load external libraries that you need in your rust project here | ||
| ]; | ||
| moz_overlay = import (builtins.fetchTarball "https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz"); | ||
| # Here I have used pkgs-mozilla overlays for my use case however you can use any other method you prefer!! | ||
|
|
||
| nixpkgs = import <nixpkgs> { | ||
| overlays = [ | ||
| moz_overlay | ||
| ]; | ||
| }; | ||
|
|
||
| in | ||
| mkShell { | ||
| name = "moz_overlay_shell"; | ||
| buildInputs = [ | ||
| libGL.dev | ||
| libgbm | ||
| pkg-config | ||
| wayland.dev | ||
| nixpkgs.latest.rustChannels.nightly.rust | ||
| ]; | ||
| LD_LIBRARY_PATH = libPath; | ||
| RUST_BACKTRACE = 1; | ||
| shellHook = '' | ||
| # Set the RUST_SRC_PATH environment variable to the rust-src location if required | ||
| export RUST_SRC_PATH="${nixpkgs.latest.rustChannels.nightly.rust-src}/lib/rustlib/src/rust/library" | ||
| ''; | ||
| BINDGEN_EXTRA_CLANG_ARGS = | ||
| (builtins.map (a: ''-I"${a}/include"'') [ | ||
| # Add include paths for other libraries here | ||
| ]) | ||
| ++ [ | ||
| # Special directories | ||
| ]; | ||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.