Skip to content

Commit

Permalink
Add dev shell flake
Browse files Browse the repository at this point in the history
  • Loading branch information
ku1ik committed Feb 12, 2024
1 parent 8422d9e commit 9c9d653
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
/node_modules
/dist
/public
/.direnv
/.envrc
61 changes: 61 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
description = "asciinema player";

inputs = {
nixpkgs.url = github:nixos/nixpkgs/nixpkgs-unstable;
flake-utils.url = github:numtide/flake-utils;
};

outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem
(system:
let pkgs = nixpkgs.legacyPackages.${system}; in
{
devShells.default = pkgs.mkShell {
nativeBuildInputs = [
pkgs.rustup
pkgs.nodejs_18
pkgs.python3
];

shellHook = ''
alias build='npm run build && npm run bundle'
alias serve='cd public && python -m http.server 5000'
'';
};
}
);
}

0 comments on commit 9c9d653

Please sign in to comment.