use new deno with packages
This commit is contained in:
parent
864ace2581
commit
22e9ebc0f7
3 changed files with 33 additions and 58 deletions
17
flake.nix
17
flake.nix
|
|
@ -4,29 +4,34 @@
|
|||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
flake-root.url = "github:srid/flake-root";
|
||||
deno-with-packages.url = "github:voleum-org/deno-with-packages";
|
||||
deno-with-packages.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
imports = [
|
||||
inputs.flake-root.flakeModule
|
||||
inputs.deno-with-packages.flakeModule
|
||||
];
|
||||
systems = [ "x86_64-linux" ];
|
||||
perSystem = { self', pkgs, config, system, ... }: let
|
||||
lib = import ./nix // inputs.deno-with-packages.lib.${system};
|
||||
lib = import ./nix;
|
||||
shelf = import ./shelf {
|
||||
inherit pkgs system lib;
|
||||
};
|
||||
in {
|
||||
deno = {
|
||||
enable = true;
|
||||
lockfiles = shelf.lockfiles;
|
||||
};
|
||||
|
||||
packages.website =
|
||||
import ./nix/website.nix { inherit pkgs; root = ./.; };
|
||||
|
||||
devShells.default = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [ deno pandoc reuse ];
|
||||
buildInputs = with pkgs; [ config.packages.deno pandoc reuse ];
|
||||
inputsFrom = [ config.flake-root.devShell ];
|
||||
shellHook = ''
|
||||
export DENO_DIR=$PWD/.deno_cache
|
||||
${shelf.setupScript}/bin/install-deno-cache
|
||||
|
||||
echo "Available scrolls:"
|
||||
echo ${pkgs.lib.escapeShellArg (builtins.toJSON shelf.scrolls)} | jq .
|
||||
'';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue