generated from tweag/project
-
Notifications
You must be signed in to change notification settings - Fork 31
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 #687 from tweag/erin/nix-cleanup
chore: add our scripts to our flake.nix
- Loading branch information
Showing
10 changed files
with
105 additions
and
39 deletions.
There are no files selected for viewing
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
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,56 @@ | ||
{ pkgs, writeShellApplication }: | ||
{ | ||
# FIXME: Broken | ||
# TODO: Don't use rustup to install these components but just use Nix | ||
# generate-coverage = writeShellApplication { | ||
# name = "generate-coverage"; | ||
|
||
# runtimeInputs = with pkgs; [ | ||
# cacert | ||
# grcov | ||
# rustup | ||
# ]; | ||
|
||
# text = builtins.readFile ./generate-coverage.sh; | ||
# }; | ||
|
||
playground = writeShellApplication { | ||
name = "playground"; | ||
|
||
runtimeInputs = with pkgs; [ | ||
inotify-tools | ||
]; | ||
|
||
text = builtins.readFile ./playground.sh; | ||
}; | ||
|
||
update-wasm-app = writeShellApplication { | ||
name = "update-wasm-app"; | ||
|
||
text = builtins.readFile ./update-wasm-app.sh; | ||
}; | ||
|
||
update-wasm-grammars = writeShellApplication { | ||
name = "update-wasm-grammars"; | ||
|
||
runtimeInputs = with pkgs; [ | ||
emscripten | ||
git | ||
toml2json | ||
tree-sitter | ||
]; | ||
|
||
text = builtins.readFile ./update-wasm-grammars.sh; | ||
}; | ||
|
||
verify-documented-usage = writeShellApplication { | ||
name = "verify-documented-usage"; | ||
|
||
runtimeInputs = with pkgs; [ | ||
diffutils | ||
gnused | ||
]; | ||
|
||
text = builtins.readFile ./verify-documented-usage.sh; | ||
}; | ||
} |
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -1,29 +1,23 @@ | ||
# Allows `nix-shell` without having to go trough the trouble of pinning the same | ||
# version as is done by the flake. | ||
{ pkgs ? import <nixpkgs> { } | ||
{ pkgs | ||
, checks ? { } | ||
, craneLib | ||
, binPkgs | ||
}: | ||
let | ||
update-wasm-grammars = pkgs.writeShellApplication { | ||
name = "update-wasm-grammars"; | ||
|
||
runtimeInputs = with pkgs; [ | ||
emscripten | ||
git | ||
toml2json | ||
tree-sitter | ||
]; | ||
|
||
text = builtins.readFile ./update-wasm-grammars.sh; | ||
}; | ||
in | ||
craneLib.devShell { | ||
inherit checks; | ||
|
||
packages = with pkgs; [ | ||
update-wasm-grammars | ||
packages = with pkgs; with binPkgs; [ | ||
cargo-flamegraph | ||
rust-analyzer | ||
|
||
# Our own scripts | ||
# FIXME: Broken | ||
# generate-coverage | ||
playground | ||
update-wasm-app | ||
update-wasm-grammars | ||
verify-documented-usage | ||
]; | ||
} |